Hans Leidekker : webservices: Implement WS_CHANNEL_PROPERTY_NO_DELAY.
Alexandre Julliard
julliard at winehq.org
Tue Mar 16 16:39:04 CDT 2021
Module: wine
Branch: master
Commit: a613bee2764cf0bd2f84146d1a862513f02e426e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a613bee2764cf0bd2f84146d1a862513f02e426e
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Mar 16 17:07:35 2021 +0100
webservices: Implement WS_CHANNEL_PROPERTY_NO_DELAY.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/webservices/channel.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c
index f2906c86733..fd7c8d6029d 100644
--- a/dlls/webservices/channel.c
+++ b/dlls/webservices/channel.c
@@ -971,6 +971,7 @@ static HRESULT connect_channel_tcp( struct channel *channel )
{
struct sockaddr_storage storage;
struct sockaddr *addr = (struct sockaddr *)&storage;
+ BOOL nodelay = FALSE;
int addr_len;
WS_URL_SCHEME_TYPE scheme;
WCHAR *host;
@@ -1002,6 +1003,8 @@ static HRESULT connect_channel_tcp( struct channel *channel )
return HRESULT_FROM_WIN32( WSAGetLastError() );
}
+ prop_get( channel->prop, channel->prop_count, WS_CHANNEL_PROPERTY_NO_DELAY, &nodelay, sizeof(nodelay) );
+ setsockopt( channel->u.tcp.socket, IPPROTO_TCP, TCP_NODELAY, (const char *)&nodelay, sizeof(nodelay) );
return S_OK;
}
@@ -2410,7 +2413,12 @@ HRESULT channel_accept_tcp( SOCKET socket, HANDLE wait, HANDLE cancel, WS_CHANNE
return E_INVALIDARG;
}
- hr = sock_accept( socket, wait, cancel, &channel->u.tcp.socket );
+ if ((hr = sock_accept( socket, wait, cancel, &channel->u.tcp.socket )) == S_OK)
+ {
+ BOOL nodelay = FALSE;
+ prop_get( channel->prop, channel->prop_count, WS_CHANNEL_PROPERTY_NO_DELAY, &nodelay, sizeof(nodelay) );
+ setsockopt( channel->u.tcp.socket, IPPROTO_TCP, TCP_NODELAY, (const char *)&nodelay, sizeof(nodelay) );
+ }
LeaveCriticalSection( &channel->cs );
return hr;
More information about the wine-cvs
mailing list