> Back to implementation, is there a way to do these steps: > 1. Periodically check the state of TWSocket > 2. If it is not listening, put it to listen again > 3. If no response from TWSocket, destroy it and create a new > instance
There is no reason for a socket to stop listening. I've got an ICS V5 application running on three servers and accepting an average of one connection a second, that runs for several months between restarts. I have another application where sometimes Windows does get confused and TCP/IP stops behaving correctly, and only a restart of the application, or sometimes a PC reboot will fix it. So I'd suggest your monitoring service itself tries to connect to your listening socket once a minute sending dummy data, and then goes into a cycle of restarting the service or rebooting the server if there is no response over various intervals, I use five minutes for a restart, 30 minutes for a reboot (after six restarts). Also, the main application could send a windows message to the monitoring application every time a socket connects, and you can then restart the application faster if you expecting a certain level of connections each minute. I really would not bother about more debugging code, it's unlikely to be an ICS problem, more likely a Windows update has corrupted something in TCP/IP. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be