socket.io
socket.io copied to clipboard
How to handle backpreassure?
There is a lot of comments related about memory leaks, so I want to know how socketio allows to developers manage backpreassure.
I know using the volatile method allows to "fire and forget", but that not fix the problem when the socket is slow for receive the message.
Hi! Managing backpressure can be done with client acknowledgements: the server sends a packet, and wait for the acknowledgement of the client before sending another packet.
This way, the client can control the number of incoming packets and not get overwhelmed.