X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=winnet.c;h=bcb22bf4bfe306d8948850542b0f849410290381;hb=0edefb1809a783e8302ac2faf604e99729c6cda0;hp=81885c663a877863706386f69c84ce8282b3930b;hpb=4d76ca6658d4d557f1525e791cdb8910b5af4177;p=PuTTY.git diff --git a/winnet.c b/winnet.c index 81885c66..bcb22bf4 100644 --- a/winnet.c +++ b/winnet.c @@ -237,6 +237,8 @@ void sk_cleanup(void) for (i = 0; (s = index234(sktree, i)) != NULL; i++) { p_closesocket(s->s); } + freetree234(sktree); + sktree = NULL; } p_WSACleanup(); @@ -656,7 +658,7 @@ Socket sk_register(void *sock, Plug plug) } Socket sk_new(SockAddr addr, int port, int privport, int oobinline, - int nodelay, Plug plug) + int nodelay, int keepalive, Plug plug) { static const struct socket_function_table fn_table = { sk_tcp_plug, @@ -720,6 +722,11 @@ Socket sk_new(SockAddr addr, int port, int privport, int oobinline, p_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *) &b, sizeof(b)); } + if (keepalive) { + BOOL b = TRUE; + p_setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *) &b, sizeof(b)); + } + /* * Bind to local address. */ @@ -1355,3 +1362,11 @@ int net_service_lookup(char *service) else return 0; } + +SockAddr platform_get_x11_unix_address(int displaynum, char **canonicalname) +{ + SockAddr ret = snew(struct SockAddr_tag); + memset(ret, 0, sizeof(struct SockAddr_tag)); + ret->error = "unix sockets not supported on this platform"; + return ret; +}