Dear all, I'm debugging an multithread application that is both client and server, when the client does not have to send data to the server it simply sends a special keepalive message. The aim of this project is to syncronize many branch site with a central site.
The central site send a configuration message to the branch site and in reply it receives sync messages. When both site are not sending data they send keepalive and if the keepalive message is not replied the communication in shutted down and the central site restats the process. The communication from central site to branch site is in one thread per brach site, so they are indipendent one from the other. The configuration message is sent even to disconnected branch site causing soap send errors. I'm in the process of change this part of the program introducing a ICMP ping before trying to establish communication. I have some problems: 1) the fuction that send message takes 20 to 30 seconds to return even if the messagge is sent and the empty reply is received in the same second (I can see this capturing network trafic with wireshark). This cause the keepalive timeout to expire and the communication to restart. 2) even if the application sends and empty response with SOAP_OK I receive a 202 reply 3) I have 112-198 socket in TIME_WAIT on both side of the communication What I need to change in the soap options to shut down the communication ASAP and reduce the socket I use? I'm not setting SO_LINGER so I expect a RST to close communication but still see FYN/ACK. I'm working on Windows XP and Windows NT. TIA Stefano
