pthreads and sockets - Cannot register window class error

Reini Urban rurban@x-ray.at
Wed May 5 12:42:00 GMT 2004


Arash Partow schrieb:
> I can't replicate your problem, but I know where it is coming from,
> basically standard windows winsock is not geared up to handle that man
> socket connections. When a socket is made and then closed the socket
> actually stays open for about 240-300 seconds depending on your
> registry settings, this is so that winsock can make sure the
> connection has been properly closed off.
> 
> Whilst this 240-300 seconds is passing by the socket is actually still
> alive meaning the memory it occupies is still valid, its not until the
> 240 seconds has passed does winsock go and clean up the instance of
> the socket.
> 
> what you are seeing is that basically as you run your program more and
> more times, you are creating sockets in memory, every time the socket
> is closed YOU think that the socket is cleaned up but its not, and so
> you basically loose a bit of memory until the timeout for the socket
> has occurred, i guess through debugging where you run and re-run your
> test app you have run out of RAM so you see these errors.
> 
> this explains the whole thing:
> http://www.winguides.com/registry/display.php/878/

$ regtool -i set 
"/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/TcpTimedWaitDelay" 
30

But we already found out that the culprit was Norton Firewall, closing 
your socket, wasn't it?
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list