added OpenPGM receiver - ZMQ_SUB

This commit is contained in:
malosek
2009-09-16 10:11:01 +02:00
parent 0381a78c04
commit 969522bbf5
11 changed files with 396 additions and 26 deletions

View File

@@ -101,6 +101,12 @@ int zmq::sub_t::recv (struct zmq_msg_t *msg_, int flags_)
if (rc != 0 && errno == EAGAIN)
return -1;
// If there is no subscription return -1/EAGAIN.
if (!all_count && prefixes.empty () && topics.empty ()) {
errno = EAGAIN;
return -1;
}
// If there is at least one "*" subscription, the message matches.
if (all_count)
return 0;