0c606fe1eafe250a7ad5aaf67c3c46690f787618 galt Fri Sep 14 16:25:31 2012 -0700 making tcp connect timeout be a define constant diff --git src/inc/net.h src/inc/net.h index e1ea0d4..2217878 100644 --- src/inc/net.h +++ src/inc/net.h @@ -1,27 +1,29 @@ /* Net.h some stuff to wrap around net communications. * * This file is copyright 2002 Jim Kent, but license is hereby * granted for all use - public, private or commercial. */ #ifndef NET_H #define NET_H #include "linefile.h" #include "dystring.h" +#define DEFAULTCONNECTTIMEOUTMSEC 10000 /* default connect timeout for tcp in milliseconds */ + void setConnFailuresEnabled(boolean val); /* Turn on or off the connFailures feature */ boolean checkConnFailure(char *hostName, int port, char **pErrStr); /* check if this hostName:port has already had failure * which can save time and avoid more timeouts */ void addConnFailure(char *hostName, int port, char *format, ...) /* add a failure to connFailures[] * which can save time and avoid more timeouts */ #if defined(__GNUC__) __attribute__((format(printf, 3, 4))) #endif ;