r-lib / pingr

ICMP and TCP ping and related tools
http://r-lib.github.io/pingr/
Other
34 stars 8 forks source link

Timeout during connect, for ping_port #3

Closed gaborcsardi closed 9 years ago

gaborcsardi commented 9 years ago

Need to connect in non-blocking mode, wait until connected, or the timeout is up, and then switch back to blocking mode. Maybe we don't even have to switch back....

gaborcsardi commented 9 years ago

Done, seem to work on windows as well, although as I read non-blocking sockets are a mess and should be avoided on windows.....