Module: wine Branch: master Commit: c280970c3e04021645353db52169f22f68ad4670 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c280970c3e04021645353db521...
Author: Jacek Caban jacek@codeweavers.com Date: Wed May 11 11:32:34 2011 +0000
wininet: Set TCP_NODELAY on socket.
---
dlls/wininet/netconnection.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index c1e108e..1119e48 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -58,6 +58,9 @@ #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif +#ifdef HAVE_NETINET_TCP_H +# include <netinet/tcp.h> +#endif #ifdef HAVE_OPENSSL_SSL_H # include <openssl/ssl.h> # include <openssl/opensslv.h> @@ -497,7 +500,7 @@ static DWORD init_openssl(void) DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netconn_t **ret) { netconn_t *netconn; - int result; + int result, flag;
if(useSSL) { DWORD res; @@ -532,6 +535,13 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netcon return sock_get_error(errno); }
+#ifdef TCP_NODELAY + flag = 1; + result = setsockopt(netconn->socketFD, IPPROTO_TCP, TCP_NODELAY, (void*)&flag, sizeof(flag)); + if(result < 0) + WARN("setsockopt(TCP_NODELAY) failed\n"); +#endif + server_addref(server); netconn->server = server;