Websockets request-response mapping

Viewed 880

Is there a way to map a request with a response from server? It seems that Websocket doesn't provide anything.

I don't want to use a third library so it has to be in plain javascript (or at least with jquery).

I would implement a message id. When i send something the generated message id will be prepended to the message and the server will give the response with this message id so i'm able to map on the client side.

Any better ideas?

1 Answers
Related