Re: Disonnecting a TCP listening socket



On 19 sep, 20:41, Rick Jones <rick.jon...@xxxxxx> wrote:
true...@xxxxxxxxx wrote:
If a server program wants to stop accepting client connections, it
just has to close() the listening socket. By doing this, it also
discards the connections that are established, but that accept()
hasn't returned yet.
My question therefore is : is it possible to tell the OS to stop
accepting incoming connection requests, and still getting the
connections that are already established and waiting in the queue ?

Might look into what happens to existing connections when you set the
backlog to a very small number.  It may not close the window entirely,
but it may close it just enough.  Or it may behave just like close()
against the listen endpoint...

How do you modify the backlog of existing connections ?

Jean-Luc

.



Relevant Pages