Setting Timeout for a Socket (phobos D1.0)

Zane zane.sims at gmail.com
Sun Jan 17 07:15:18 PST 2010


Hello all,

Could anyone give me an example of how to set the timeout for a socket connection using phobos' std.socket.Socket?  Doing a:

TcpSocket tsock = new TcpSocket(new InternetAddress(addr, port));

If the addr exists but the computer at addr does not have port open, the timeout is FAR too long.

Thanks in advance!



More information about the Digitalmars-d mailing list