-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Successive emits are concatenated ! #392
Comments
From what I see in documentation, you use Websockets transfer protocol which does not have polling.
|
Might be related to this old issue of websocketpp? |
It seems that socket.io fills a buffer and then empties it:
|
I guess that I should use lock - unlock of mutex. I have tried this but it does not work:
|
Still fighting, it is reported also by others in Stackoverflow (in Javascript language): https://stackoverflow.com/questions/70134755/calling-asynchronous-socket-io-io-emit-in-synchronous-way |
Hi,
I am trying to make a progress update mechanism, i.e. a progress bar that is based on successive emits from socket.io-cpp to the server. For some unknown reason, all emits, i.e. 0%, 1%, 2% .... 100%, are concatenated and the server receives all of them at once when 100% has reached :(
I see that in documentation, there is the phrase for HTTP long polling [1]:
"Due to the nature of the transport, successive emits may be concatenated and sent within the same HTTP request."
How can I avoid that ???
Does socket-io-cpp use "Websockets" or "HTTP-polling" ?
Is the method Operating system or hardware dependent ?, e.g. different behaviour in Linux vs Windows ?
How can I change the emit rate in both cases ?
Best,
Dimitrios Ververidis
[1] https://socket.io/docs/v3/how-it-works/
The text was updated successfully, but these errors were encountered: