> > Besides removing the socket from the epoll/kqueue/etc. set, > > uv_listen_stop() should probably also call listen(sock, 0), otherwise > > new connections still end up in the accept queue. On the other hand, > > I imagine that's sometimes the desired behavior.
The windows story is a bit more complicated because there is a iocp queue of accepted connections. So listen_stop() could work but it couldn't take effect immediately - the queue of incoming connections would still be delivered to the completion port. We could buffer them up for the time the user calls uv_listen() or uv_listen_start(), or we could just dispatch them to the user and the user would have to deal with the fact that listen_stop() is not immediate. I don't think listen(sock, 0) does what you guys think. The server doesn't stop accepting connections - it just sets the backlog to the default value. - Bert -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
