WebSocket provides bidirectional communication as if a person were talking. The client can send data to the server, and the server can send data to the client at any time. But what about request-response behavior? The client may ask the server something and wait for an answer. Websocket does not seem to provide anything to associate client data (request) with server data (response).
This is probably the work of the sub-protocol, and I have some ideas on how to do this (send an identifier with a request and wait for a response with the same identifier during the wait period).
In order not to reinvent the wheel and save time, I searched the Internet for an existing solution, but did not find anything related (possibly with bad keywords).
So, does anyone know about this work or am I missing something?
websocket
Ghetolay Jun 04 2018-12-12T00: 00Z
source share