mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-08-18 22:07:11 +02:00
Update ZMQ to current git.
This commit is contained in:
29
vendor/ZMQ/src/options.cpp
vendored
29
vendor/ZMQ/src/options.cpp
vendored
@@ -254,7 +254,10 @@ zmq::options_t::options_t () :
|
||||
hello_msg (),
|
||||
can_send_hello_msg (false),
|
||||
disconnect_msg (),
|
||||
can_recv_disconnect_msg (false)
|
||||
can_recv_disconnect_msg (false),
|
||||
hiccup_msg (),
|
||||
can_recv_hiccup_msg (false),
|
||||
busy_poll (0)
|
||||
{
|
||||
memset (curve_public_key, 0, CURVE_KEYSIZE);
|
||||
memset (curve_secret_key, 0, CURVE_KEYSIZE);
|
||||
@@ -802,6 +805,12 @@ int zmq::options_t::setsockopt (int option_,
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_BUSY_POLL:
|
||||
if (is_int) {
|
||||
busy_poll = value;
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#ifdef ZMQ_HAVE_WSS
|
||||
case ZMQ_WSS_KEY_PEM:
|
||||
// TODO: check if valid certificate
|
||||
@@ -852,6 +861,18 @@ int zmq::options_t::setsockopt (int option_,
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_HICCUP_MSG:
|
||||
if (optvallen_ > 0) {
|
||||
unsigned char *bytes = (unsigned char *) optval_;
|
||||
hiccup_msg =
|
||||
std::vector<unsigned char> (bytes, bytes + optvallen_);
|
||||
} else {
|
||||
hiccup_msg = std::vector<unsigned char> ();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
default:
|
||||
@@ -1285,6 +1306,12 @@ int zmq::options_t::getsockopt (int option_,
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_BUSY_POLL:
|
||||
if (is_int) {
|
||||
*value = busy_poll;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user