-
Notifications
You must be signed in to change notification settings - Fork 854
Description
We've hit a case where we need to know when a write to the underlying socket has been completed. We're sending quite a large amount of latency sensitive data, such that the network can sometimes not keep up. It would be really helpful to be able to monitor when a write actually completes so we can scale back writes when the network slows down. The underlying Starscream WebSokcet class already provides this functionality via a completion handler called on write completion. Ideally this would be exposed up through socket.io as well.
We've considered using the ack mechanism from the server that's already supported by this library, but the extra latency that the network call introduces is unacceptable for our use case.
Is there a way to achieve this with the current APIs? And if not would you accept a PR adding this functionality?