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
Hi,
Is is possible for the application to indicate that it isn't ready to receive any more messages at this time. so the library will stop recv()-ing data from the client, until the application indicates it is ready to receive more?
Suppose that I am putting received data into a queue and I have another thread that is processing from the queue, and it is resource-intensive. I can't let the queue grow without bounds if data is being received faster than it is being processed. I need to pause receiving data until the queue has drained sufficiently.
The text was updated successfully, but these errors were encountered:
For compatibility with TLS you cannot stop receiving without also stopping writing, TLS cannot receive without also sending.
If you want to stop both, that could be added in uSockets like us_socket_throttle but you could probably just use us_poll_change on the socket. If you look in uSockets it should be reasonably simple to add.
A WebSocket pointer is a struct us_socket_t pointer, which is also a struct us_poll_t pointer so you can just change events being polled to nothing until done. I can't help right now but that's the idea
Hi,
Is is possible for the application to indicate that it isn't ready to receive any more messages at this time. so the library will stop recv()-ing data from the client, until the application indicates it is ready to receive more?
Suppose that I am putting received data into a queue and I have another thread that is processing from the queue, and it is resource-intensive. I can't let the queue grow without bounds if data is being received faster than it is being processed. I need to pause receiving data until the queue has drained sufficiently.
The text was updated successfully, but these errors were encountered: