Checking if a port is listening

Marc Schütz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 17 03:41:55 PDT 2016


On Wednesday, 16 March 2016 at 22:22:15 UTC, Anonymouse wrote:
> import core.thread;  // for .seconds

Nitpick: `seconds` is defined in `core.time`; `core.thread` just 
reexports it.

> s.setOption(SocketOptionLevel.SOCKET, SNDTIMEO, 10.seconds);
> s.setOption(SocketOptionLevel.SOCKET, RCVTIMEO, 10.seconds);



More information about the Digitalmars-d-learn mailing list