Windows: use SO_KEEPALIVE instead of TCP_KEEPALIVE

MinGW doesn't understand the latter. Closes GH-228.
This commit is contained in:
Luis Lavena 2011-10-28 20:09:03 -03:00 committed by Bert Belder
parent ed2b5e60cb
commit 99b512e890

View File

@ -71,7 +71,7 @@ static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsign
if (enable && setsockopt(socket,
IPPROTO_TCP,
TCP_KEEPALIVE,
SO_KEEPALIVE,
(const char*)&delay,
sizeof delay) == -1) {
uv__set_sys_error(handle->loop, errno);
@ -1068,4 +1068,4 @@ int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
}
return 0;
}
}