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've explored the example server available at this link #2766https://github.com/vinniefalco/CppCon2018, and I'm a little unsure of the best approach to implementing a particular functionality. I need to set up two WebSocket channels on the same server, both serving different purposes.
The first WebSocket connection is supposed to consistently send data to the client at a high frequency (The server receives data about hardware performance and sends it to the client). Meanwhile, the second connection is intended to receive alerts and commands to control the server.
Could you please give recommendations or point me in the right direction on how to achieve this?
The text was updated successfully, but these errors were encountered:
In the handshaking process, you have the flexibility to use different request-target values. In the client-side code, you can pass a different target parameter to async_handshake, while in the server-side code, you can utilize the specified overload of async_accept to inspect the request-target field in the request and decide what to do with the connection.
Alternatively, you can initiate communication with the server by sending a message at the beginning of each connection. Inside the server, after reading the initial message, you can determine the appropriate actions to take based on the content. For instance, if you are using JSON messages, a message could look like this:
I've explored the example server available at this link #2766 https://github.com/vinniefalco/CppCon2018, and I'm a little unsure of the best approach to implementing a particular functionality. I need to set up two WebSocket channels on the same server, both serving different purposes.
The first WebSocket connection is supposed to consistently send data to the client at a high frequency (The server receives data about hardware performance and sends it to the client). Meanwhile, the second connection is intended to receive alerts and commands to control the server.
Could you please give recommendations or point me in the right direction on how to achieve this?
The text was updated successfully, but these errors were encountered: