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

@ -1,4 +1,4 @@
/* $Id: testback.c,v 1.9 2003/05/10 11:57:55 ben Exp $ */
/* $Id: testback.c,v 1.10 2004/06/20 17:07:32 jacob Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999 Ben Harris
@ -34,9 +34,9 @@
#include "putty.h"
static const char *null_init(void *, void **, Config *, char *, int, char **,
int);
int, int);
static const char *loop_init(void *, void **, Config *, char *, int, char **,
int);
int, int);
static void null_free(void *);
static void loop_free(void *);
static void null_reconfig(void *, Config *);
@ -72,14 +72,14 @@ struct loop_state {
static const char *null_init(void *frontend_handle, void **backend_handle,
Config *cfg, char *host, int port,
char **realhost, int nodelay) {
char **realhost, int nodelay, int keepalive) {
return NULL;
}
static const char *loop_init(void *frontend_handle, void **backend_handle,
Config *cfg, char *host, int port,
char **realhost, int nodelay) {
char **realhost, int nodelay, int keepalive) {
struct loop_state *st = snew(struct loop_state);
st->term = frontend_handle;