1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-17 11:00:59 -05:00

Add a configuration option for TCP keepalives (SO_KEEPALIVE), default off.

No very good reason, but I've occasionally wanted to frob it to see if it
makes any difference to problems I'm having, and it was easy.

Tested that it does actually cause keepalives on Windows (with tcpdump);
should also work on Unix. Not implemented on Mac (does nothing), but then
neither is TCP_NODELAY.

Quite a big checkin, much of which is adding `keepalive' alongside `nodelay'
in network function calls.

[originally from svn r4309]
This commit is contained in:
Jacob Nevins
2004-06-20 17:07:38 +00:00
parent 6bcac21e36
commit 20f433efac
29 changed files with 109 additions and 51 deletions

View File

@ -79,8 +79,8 @@ struct plug_function_table {
* responsibility for freeing it */
Socket new_connection(SockAddr addr, char *hostname,
int port, int privport,
int oobinline, int nodelay, Plug plug,
const Config *cfg);
int oobinline, int nodelay, int keepalive,
Plug plug, const Config *cfg);
Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only,
const Config *cfg);
SockAddr name_lookup(char *host, int port, char **canonicalname,
@ -90,8 +90,8 @@ SockAddr name_lookup(char *host, int port, char **canonicalname,
/* (same caveat about addr as new_connection()) */
Socket platform_new_connection(SockAddr addr, char *hostname,
int port, int privport,
int oobinline, int nodelay, Plug plug,
const Config *cfg);
int oobinline, int nodelay, int keepalive,
Plug plug, const Config *cfg);
/* socket functions */
@ -111,7 +111,7 @@ void sk_addr_free(SockAddr addr);
/* NB, control of 'addr' is passed via sk_new, which takes responsibility
* for freeing it, as for new_connection() */
Socket sk_new(SockAddr addr, int port, int privport, int oobinline,
int nodelay, Plug p);
int nodelay, int keepalive, Plug p);
Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only);