mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 11:31:56 +01:00
Renamed new socket options to be clearer
* ZMQ_REQ_STRICT was negative option (default 1) which goes against the standard, where defaults are zero. I renamed this to ZMQ_REQ_RELAXED. * ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE which seems more explicit.
This commit is contained in:
@@ -198,16 +198,16 @@ int zmq::req_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_
|
||||
bool is_int = (optvallen_ == sizeof (int));
|
||||
int value = is_int? *((int *) optval_): 0;
|
||||
switch (option_) {
|
||||
case ZMQ_REQ_REQUEST_IDS:
|
||||
case ZMQ_REQ_CORRELATE:
|
||||
if (is_int && value >= 0) {
|
||||
request_id_frames_enabled = (value != 0);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_REQ_STRICT:
|
||||
case ZMQ_REQ_RELAXED:
|
||||
if (is_int && value >= 0) {
|
||||
strict = (value != 0);
|
||||
strict = (value == 0);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user