4 ms·
> Not calling 'accept' pushes pressure back to the clients To stop calling accept() you could remove or pause READ event for server's FD from event loop once t
by zzzcpan 13y ago
> Not calling 'accept' pushes pressure back to the clients
To stop calling accept() you could remove or pause READ event for server's FD from event loop once the limit is reached and unpause once it goes down. Not a big deal.
> If 'write' is non-blocking _and_ always succeeds
Why would it always succeed? Obviously it should call back on completion.
- rbrcurtis 13y agoCombined with node-toobusy, pausing READ events sounds perfect, but I can't figure out how to do that. Can you explain?
- zzzcpan 13y agoSorry, don't know much about nodejs. But it seems that node does have a way to remove/setup events, and pause read events: http://nodejs.org/api/events.html#events_emitter_removelistener_event_listener http://nodejs.org/api/events.html#events_emitter_removeliste... http://nodejs.org/api/net.html#net_socket_pause http://nodejs.org/api/net.html#net_socket_pause