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
From the documentation and code of socket.io and its dependencies such as engine.io and ws it's not clear, how to implement output intensive server application, that is capable to handle slow clients by considering "backpressure" (As described in https://nodejs.org/en/docs/guides/backpressuring-in-streams/ ). And it seems to be impossible.
Steps to reproduce (if the current behaviour is a bug)
It's not a bug, so, no step to reproduce.
Expected behaviour
I would expect socket.emit() to return bool and socket have 'drain' event, so that I could work with it like this (simplified):
someExternalSourceOfEvents.on('frequent_event', function(data) {
var ok = socket.emit('event', data);
if (!ok) {
someExternalSourceOfEvents.pause();
socket.on('drain', function() {
someExternalSourceOfEvents.continue();
});
}
});
The text was updated successfully, but these errors were encountered:
You want to:
Current behaviour
From the documentation and code of socket.io and its dependencies such as engine.io and ws it's not clear, how to implement output intensive server application, that is capable to handle slow clients by considering "backpressure" (As described in https://nodejs.org/en/docs/guides/backpressuring-in-streams/ ). And it seems to be impossible.
Steps to reproduce (if the current behaviour is a bug)
It's not a bug, so, no step to reproduce.
Expected behaviour
I would expect socket.emit() to return bool and socket have 'drain' event, so that I could work with it like this (simplified):
The text was updated successfully, but these errors were encountered: