mirror of
https://github.com/reactos/wine.git
synced 2025-02-21 05:11:57 +00:00
wininet: Set TCP_NODELAY on socket.
This commit is contained in:
parent
e8bdbf879a
commit
c280970c3e
@ -58,6 +58,9 @@
|
|||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
# include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
# include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_OPENSSL_SSL_H
|
#ifdef HAVE_OPENSSL_SSL_H
|
||||||
# include <openssl/ssl.h>
|
# include <openssl/ssl.h>
|
||||||
# include <openssl/opensslv.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)
|
DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netconn_t **ret)
|
||||||
{
|
{
|
||||||
netconn_t *netconn;
|
netconn_t *netconn;
|
||||||
int result;
|
int result, flag;
|
||||||
|
|
||||||
if(useSSL) {
|
if(useSSL) {
|
||||||
DWORD res;
|
DWORD res;
|
||||||
@ -532,6 +535,13 @@ DWORD create_netconn(BOOL useSSL, server_t *server, DWORD security_flags, netcon
|
|||||||
return sock_get_error(errno);
|
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);
|
server_addref(server);
|
||||||
netconn->server = server;
|
netconn->server = server;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user