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:
Pieter Hintjens
2013-09-20 15:30:04 +02:00
parent 0997a8b753
commit 5e609be345
9 changed files with 32 additions and 33 deletions

View File

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