On Mon, 2011-03-28 at 04:36 -0700, megatron wrote: > method: > 1. listen(iSock,0),but is doesn't work.still more than one client can > > connected. > 2. closesocket(tsock) after send().But after several times the > closesocket > > funcion doesn't return.
I think this problem was raised a few months ago by someone else, so you might want to search through the mailing list archives. Method (1) doesn't work because of the way the backlog parameter is handled internally. I think 0 was used as a special value to mean "no backlog enforced" rather than "don't allow any connections to be queued". I think this has been changed in the current code, but I'm working from memory so could be wrong. I don't understand how method (2) would work. Why would closing tsock affect the listening socket (isock)? > How can I do with this situation that there are more than one > client? Try closing the listening socket after you've accepted the connection you want, then re-creating the listening socket when you're ready to listen again. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
