mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
Merge pull request #762 from ricnewton/master
Fix windows build for type of service.
This commit is contained in:
commit
a9eb6f792b
@ -620,6 +620,7 @@ set(tests
|
|||||||
test_shutdown_stress
|
test_shutdown_stress
|
||||||
test_timeo
|
test_timeo
|
||||||
test_many_sockets
|
test_many_sockets
|
||||||
|
test_diffserv
|
||||||
)
|
)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
list(APPEND tests
|
list(APPEND tests
|
||||||
|
@ -149,17 +149,13 @@ bool zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void zmq::set_ip_type_of_service (fd_t s_, int iptos)
|
void zmq::set_ip_type_of_service (fd_t s_, int iptos)
|
||||||
{
|
{
|
||||||
(void) s_;
|
int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, reinterpret_cast<const char*>(&iptos), sizeof(iptos));
|
||||||
|
|
||||||
int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, &iptos, sizeof(iptos));
|
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_WINDOWS
|
#ifdef ZMQ_HAVE_WINDOWS
|
||||||
wsa_assert (rc != SOCKET_ERROR);
|
wsa_assert (rc != SOCKET_ERROR);
|
||||||
#else
|
#else
|
||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user