im is writing a multi-threaded winsock and im application, having some problems with closing sockets. First of all, is there a limit for several simultaneously open sockets? allows you to talk like 32 sockets all at once.
I establish a connection on one of the sockets and transmit the information, and everything goes correctly. the problem is that when I disconnect the socket and then reconnect to the same destination, I get RST from the server after my SYN. I do not have code for the server application, so I can not debug it.
when I used SO_LINGER and it sent the RST flag at the end of each session - it worked. but I do not want to end my ties this way. when SO_LINGER was not used, the FIN flag was sent, but it seems that the connection was not really closed.
any help? thank
source
share