Hi, again -
Have you considered just setting the "backlog" parameter when you call "listen()"?
a) You've already accepted() "n" connections
b) The TCP/IP stack is queuing another "m" connections (as determined by "backlog")
c) Any connections n + m + 1 will automatically be rejected: just like you wanted to do with WSAAccept()
Just a thought ..
PS:
I looked up this question in my old copy of "Unix Network Programming, 2nd Ed", W. Richard Stevens earlier this evening ... and I *didn't* find a solution there, either. Sorry :-(
Last edited by paulsm4; 02-18-2009 at 11:51 PM.
|