Loading lib/connect.c +3 −4 Original line number Diff line number Diff line Loading @@ -857,12 +857,11 @@ CURLcode Curl_is_connected(struct connectdata *conn, return result; } static void tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) { #ifdef TCP_NODELAY struct SessionHandle *data= conn->data; curl_socklen_t onoff = (curl_socklen_t) data->set.tcp_nodelay; curl_socklen_t onoff = (curl_socklen_t) 1; int level = IPPROTO_TCP; #if 0 Loading Loading @@ -1033,7 +1032,7 @@ static CURLcode singleipconnect(struct connectdata *conn, is_tcp = (addr.family == AF_INET) && addr.socktype == SOCK_STREAM; #endif if(is_tcp && data->set.tcp_nodelay) tcpnodelay(conn, sockfd); Curl_tcpnodelay(conn, sockfd); nosigpipe(conn, sockfd); Loading lib/connect.h +3 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -102,6 +102,8 @@ CURLcode Curl_socket(struct connectdata *conn, struct Curl_sockaddr_ex *addr, curl_socket_t *sockfd); void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd); #ifdef CURLDEBUG /* * Curl_connclose() sets the bit.close bit to TRUE with an explanation. Loading lib/http2.c +5 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "multiif.h" #include "conncache.h" #include "url.h" #include "connect.h" /* The last #include files should be: */ #include "curl_memory.h" Loading Loading @@ -1441,6 +1442,10 @@ CURLcode Curl_http2_setup(struct connectdata *conn) infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n"); Curl_multi_connchanged(conn->data->multi); /* switch on TCP_NODELAY as we need to send off packets without delay for maximum throughput */ Curl_tcpnodelay(conn, conn->sock[FIRSTSOCKET]); return CURLE_OK; } Loading Loading
lib/connect.c +3 −4 Original line number Diff line number Diff line Loading @@ -857,12 +857,11 @@ CURLcode Curl_is_connected(struct connectdata *conn, return result; } static void tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd) { #ifdef TCP_NODELAY struct SessionHandle *data= conn->data; curl_socklen_t onoff = (curl_socklen_t) data->set.tcp_nodelay; curl_socklen_t onoff = (curl_socklen_t) 1; int level = IPPROTO_TCP; #if 0 Loading Loading @@ -1033,7 +1032,7 @@ static CURLcode singleipconnect(struct connectdata *conn, is_tcp = (addr.family == AF_INET) && addr.socktype == SOCK_STREAM; #endif if(is_tcp && data->set.tcp_nodelay) tcpnodelay(conn, sockfd); Curl_tcpnodelay(conn, sockfd); nosigpipe(conn, sockfd); Loading
lib/connect.h +3 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -102,6 +102,8 @@ CURLcode Curl_socket(struct connectdata *conn, struct Curl_sockaddr_ex *addr, curl_socket_t *sockfd); void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd); #ifdef CURLDEBUG /* * Curl_connclose() sets the bit.close bit to TRUE with an explanation. Loading
lib/http2.c +5 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "multiif.h" #include "conncache.h" #include "url.h" #include "connect.h" /* The last #include files should be: */ #include "curl_memory.h" Loading Loading @@ -1441,6 +1442,10 @@ CURLcode Curl_http2_setup(struct connectdata *conn) infof(conn->data, "Connection state changed (HTTP/2 confirmed)\n"); Curl_multi_connchanged(conn->data->multi); /* switch on TCP_NODELAY as we need to send off packets without delay for maximum throughput */ Curl_tcpnodelay(conn, conn->sock[FIRSTSOCKET]); return CURLE_OK; } Loading