On Jan 24, 2008 2:14 AM, Dan Hulme <<a href="mailto:dhulme@gmail.com">dhulme@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This function appears to try to append the old closed socket to a<br>linked list of free sockets. When the new connection tries to use<br>this socket, it has trouble. Once the next connection connects,<br>however, it will not use that socket as it is still in use, so it will
<br>work. Not sure why the socket that is being appended is broken, but<br>if this function is not called (at mio_impl.h: 267), the program works<br>"fine." It may not be reusing sockets, but everything else works.
<br></blockquote></div><br>In my experience win32 does weird things with closed sockets: if you close a listening socket, it doesn't actually go away until all connected clients do too. It sounds like this is similar, and that perhaps for win32 you shouldn't be trying to pool sockets.
<br clear="all"><br>-- <br>- Norman Rasmussen<br> - Email: <a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</a><br> - Home page: <a href="http://norman.rasmussen.co.za/">http://norman.rasmussen.co.za/</a>