You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I learned example_ws.cpp is an example. In this example, a server is built using the websocket protocol, and then listens for three types of messages: onopen, onclose, and onmessage. But like http1.1, this is also half-duplex. After the client connects with me, how can I actively send messages to the client as a server?
And the second half of the code of example_ws.cpp makes me wonder that commenting them does not affect websocket to listen to the above three types of messages. Can someone help me explain the role of the second half of the code?
This is the second half of the code of example_ws.cpp that puzzles me:
I learned example_ws.cpp is an example. In this example, a server is built using the websocket protocol, and then listens for three types of messages: onopen, onclose, and onmessage. But like http1.1, this is also half-duplex. After the client connects with me, how can I actively send messages to the client as a server?
And the second half of the code of example_ws.cpp makes me wonder that commenting them does not affect websocket to listen to the above three types of messages. Can someone help me explain the role of the second half of the code?
This is the second half of the code of example_ws.cpp that puzzles me:
The text was updated successfully, but these errors were encountered: