From 76d660ebd336d3dd47dd555ebbaa721a4cc978b2 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 6 Jun 2011 20:35:01 +0200 Subject: 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/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index e4bf0fb10d..cd0761ee39 100644 --- a/src/util.h +++ b/src/util.h @@ -105,6 +105,8 @@ T* alignup(T* p) typedef int socklen_t; #else #define WSAGetLastError() errno +#define WSAEINVAL EINVAL +#define WSAEALREADY EALREADY #define WSAEWOULDBLOCK EWOULDBLOCK #define WSAEMSGSIZE EMSGSIZE #define WSAEINTR EINTR -- cgit v1.2.3