TCP keepalive options not properly set on Windows

Description

On Windows, TCP keepalive options should be set with WSAIoctl() instead of setsockopt(). The way ZeroMQ does it now doesn't seem to work.
Setting keepalive parameters has been supported since Windows 2000, so that shouldn't be a problem.
More information: http://msdn.microsoft.com/en-us/library/windows/desktop/dd877220%28v=vs.85%29.aspx

Environment

Windows

Activity

Show:
Alex Grönholm
December 21, 2013, 10:40 PM

It seems like the ZMQ_HAVE_SO_KEEPALIVE, ZMQ_HAVE_TCP_KEEPIDLE, ZMQ_HAVE_TCP_KEEPALIVE and ZMQ_HAVE_TCP_KEEPINTVL options don't even get set on Windows, at least with MSVC.

Alex Grönholm
December 21, 2013, 10:54 PM

It also looks like Windows only supports the SO_KEEPALIVE socket option – the rest are not supported with setsockopt(). Microsoft's documentation referes to WSAIoctl() for setting the other keepalive options.

Alex Grönholm
December 22, 2013, 1:12 AM

Fixed the problem myself, sent pull request #797: https://github.com/zeromq/libzmq/pull/797

Alex Grönholm
December 22, 2013, 2:06 PM

Fixed by commit b554757cf0c6c9fbe8e7bfd945cb05284833f765

Fixed

Assignee

Unassigned

Reporter

Alex Grönholm

Labels

None

Components

Fix versions

Affects versions

Priority

Major