Shutdown a socket Accepting new Connections from Client

Sep 1, 2012 at 8:47am
Hi All,

I want a way to down a Server Socket accepting new TCP connection requests from Clients.

I tried Closing the Socket while many existing socket connections are in proccessing. Though this makes rejecting new TCP connections, existing socket also get affected and can not read write the data.

And I also use not going to accept() function when Server socket wants to reject the connections, but Clients give no error like 'Can not connect' Since I have already bind() the socket.


Any Idea on this matter

Thank u
Sep 1, 2012 at 6:18pm
You need to shutdown reads on the server socket.
http://pubs.opengroup.org/onlinepubs/007908799/xns/shutdown.html
Topic archived. No new replies allowed.