Wrap a socket.io call to provide similar roundtrip behavior as an http request