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
{{ message }}
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.
It would be great to have an example on how to send data from the server to a client in an asynchronous way.
I mean by that that the server should send data every couple of seconds to a connected client.
I could not figure out how this could be accomplished with the existing examples.
I think of calling something like that:
while (true) {
auto send_stream = std::make_shared<WsServer::SendStream>();
*send_stream << "mystring: " << asdfasf++;
(*(ws_server->get_connections().begin()))->send(send_stream);
sleep(2);
}
It would be great to have an example on how to send data from the server to a client in an asynchronous way.
I mean by that that the server should send data every couple of seconds to a connected client.
I could not figure out how this could be accomplished with the existing examples.
I think of calling something like that:
after that
Thanks in advance.
The text was updated successfully, but these errors were encountered: