0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-31 01:43:02 +08:00

Merge pull request #2209 from saifhhasan/master

Make ZMQ_TOS work with IPv6 sockets
This commit is contained in:
Luca Boccassi 2016-11-14 11:37:24 +01:00 committed by GitHub
commit bc1860430a

View File

@ -167,6 +167,19 @@ void zmq::set_ip_type_of_service (fd_t s_, int iptos)
{
int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, reinterpret_cast<const char*>(&iptos), sizeof(iptos));
#ifdef ZMQ_HAVE_WINDOWS
wsa_assert (rc != SOCKET_ERROR);
#else
errno_assert (rc == 0);
#endif
rc = setsockopt(
s_,
IPPROTO_IPV6,
IPV6_TCLASS,
reinterpret_cast<const char*>(&iptos),
sizeof(iptos));
#ifdef ZMQ_HAVE_WINDOWS
wsa_assert (rc != SOCKET_ERROR);
#else