> If I try to connect my TWSocket and there is no socket listening > on the other end then the TWSocket's state goes into wsConnecting > for a long time. I want to reduce that Timeout. Which property > should I use ?
TCP/IP prefers to wait 40 seconds (generally) for a connection attempt to complete, and that is set in the registry. It is not easy to change and if changed effects every application. You can abort a connection with a timer, but the socket will not be ready for another attempt until the real timeout expires. So if you don't expect the remote socket to answer, it is better to ping it first, where you can set a timeout from a second upwards, the TPingThread class is designed for exactly that, and is used in most of my applications. Ping will always work on LANs, but is sometimes blocked by firewalls so needs to be optional. 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