1
0
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:
Sandu Liviu Catalin
2021-08-22 20:09:16 +03:00
parent b78b3e8ede
commit fa4644d00f
72 changed files with 1309 additions and 884 deletions

View File

@@ -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