X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/a5ce2e9f198c1da83f7eaf81d2add879bfc644cf..2184a5d91ffbcf2de2f730c83dda2d9443035f50:/winnet.c diff --git a/winnet.c b/winnet.c index 8e1c2a1d..991443ad 100644 --- a/winnet.c +++ b/winnet.c @@ -439,7 +439,7 @@ Socket sk_register(void *sock, Plug plug) } Socket sk_new(SockAddr addr, int port, int privport, int oobinline, - Plug plug) + int nodelay, Plug plug) { static struct socket_function_table fn_table = { sk_tcp_plug, @@ -494,6 +494,11 @@ Socket sk_new(SockAddr addr, int port, int privport, int oobinline, setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (void *) &b, sizeof(b)); } + if (nodelay) { + BOOL b = TRUE; + setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *) &b, sizeof(b)); + } + /* * Bind to local address. */