by Johnny Walked
on Stack Overflow
See other posts from Stack Overflow
or by Johnny Walked
Published on 2010-05-13T15:34:48Z Indexed on 2010/05/13 16:34 UTC
Read the original article Hit count: 374
hey. im writing a multithreaded winsock application and im having some issues with closing the sockets. first of all, is there a limit for a number of simultaneously open sockets? lets say like 32 sockets all in once.
i establish a connection on one of the sockets, and passing information and it all goes right. problem is when i disconnect the socket and then reconnect to the same destination, i get a RST from the server after my SYN. i dont have the code for the server app so i cant debug it.
when i used SO_LINGER and it sent a RST flag at the end of each session - it worked. but i dont want to end my connections this way. when not using SO_LINGER a FIN flag was sent but it seems the connection was not really closed.
any help? thanks
© Stack Overflow or respective owner