From: Matt Durgavich Subject: ws2_32: socket keepalive for OSX Message-Id: Date: Wed, 29 Jul 2015 21:30:11 -0400 Set socket options for keepalive on OSX tcp connections. No tests at this time. dlls/ws2_32/socket.c | 9 +++++++++ 1 file changed, 9 insertions(+)
Set socket options for keepalive on OSX tcp connections.
No tests at this time.
 
dlls/ws2_32/socket.c | 9 +++++++++
 1 file changed, 9 insertions(+)

From e96c028c3c8f11697c3c8a46f6840be5b7a69530 Mon Sep 17 00:00:00 2001 From: Matt Durgavich Date: Tue, 21 Jul 2015 18:28:49 -0400 Subject: Socket keepalive for OSX --- dlls/ws2_32/socket.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index b06d7e7..220bdf1 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4468,6 +4468,15 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID else if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepintvl, sizeof(int)) == -1) status = WSAEINVAL; } +#elif defined(SO_KEEPALIVE) && defined(TCP_KEEPALIVE) + /* BSDish platforms like Darwin */ + else if (keepalive) + { + if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void*)&keepalive, sizeof(int)) == 1) + status = WSAEINVAL; + else if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, (void*)&keepintvl, sizeof(int)) == -1) + status = WSAEINVAL; + } #else else FIXME("ignoring keepalive interval and timeout\n"); -- 2.3.2 (Apple Git-55)