Faster timeout when connecting
authorPieter Wuille <pieter.wuille@gmail.com>
Mon, 6 Jun 2011 18:35:01 +0000 (20:35 +0200)
committerPieter Wuille <pieter.wuille@gmail.com>
Sat, 11 Jun 2011 22:29:05 +0000 (00:29 +0200)
commit76d660ebd336d3dd47dd555ebbaa721a4cc978b2
treece40033b63b17ee2527795781885a76310d5fe0d
parente051f1b510c2a8da51c099c73d5750b9c8c9422b
Faster timeout when connecting

Use non-blocking connects, and a select() call to wait a predefined
time (5s by default, but configurable with -timeout) for either
success or failure. This allows much more connections to be tried
per time unit.

Based on a patch by phantomcircuit.
src/init.cpp
src/main.h
src/net.cpp
src/net.h
src/util.h