search for: contimeout_handl

Displaying 2 results from an estimated 2 matches for "contimeout_handl".

Did you mean: contimeout_handler
2006 May 24
0
rsync connection limit
...Wed May 24 16:22:48 2006 @@ -37,6 +37,7 @@ extern char *bind_address; extern int default_af_hint; +extern int do_timeout; #ifdef HAVE_SIGACTION static struct sigaction sigact; @@ -162,6 +163,13 @@ return -1; } +/** + * connect() timeout handler based on alarm() + **/ +static RETSIGTYPE contimeout_handler(UNUSED(int val)) +{ + exit_cleanup(RERR_CON_TIMEOUT); +} /** * Open a socket to a tcp remote host with the specified port . @@ -266,11 +274,23 @@ s = -1; continue; } + if ( do_timeout > 0 ) + { + SIGACTION(SIGALRM, contimeout_handler); + alarm(do_timeout); + } + if...
2011 Nov 28
0
RFC: [PATCH] Add TCP congestion control and Diffserv options
...socket.c +++ b/socket.c @@ -38,6 +38,8 @@ extern char *bind_address; extern char *sockopts; extern int default_af_hint; extern int connect_timeout; +extern int diffserv; +extern char *congestion_alg; #ifdef HAVE_SIGACTION static struct sigaction sigact; @@ -166,6 +168,40 @@ static RETSIGTYPE contimeout_handler(UNUSED(int val)) connect_timeout = -1; } +/* Set special socket options + * + * Diffserv is a value in the range of 0-63, and needs to be shifted left + * 2 places AND treated differently for ipv4 and ipv6. + * Setting TCP congestion control is rather Linux specific (at the moment)...