1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -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

@ -269,7 +269,8 @@ enum {
struct backend_tag {
const char *(*init) (void *frontend_handle, void **backend_handle,
Config *cfg,
char *host, int port, char **realhost, int nodelay);
char *host, int port, char **realhost, int nodelay,
int keepalive);
void (*free) (void *handle);
/* back->reconfig() passes in a replacement configuration. */
void (*reconfig) (void *handle, Config *cfg);
@ -329,6 +330,7 @@ struct config_tag {
int warn_on_close;
int ping_interval; /* in seconds */
int tcp_nodelay;
int tcp_keepalives;
/* Proxy options */
char proxy_exclude_list[512];
int proxy_dns;