Category Archives: Computer Programming

TCP Connect Timeout In C# .NET

The Connect methods of the Socket and TcpClient classes fail to provide a means to form a TCP connection while allowing for a timeout.  This is particularly inconvenient because the default timeouts tend to be long, although they vary by platform.  When forced to wait over 10 seconds for a connection to succeed, a user [...]