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
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.
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.
Fixed by commit b554757cf0c6c9fbe8e7bfd945cb05284833f765