summaryrefslogtreecommitdiff
path: root/src/socket_base.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-17 23:31:29 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-17 23:31:29 +0200
commitbf78e230ad4736da9fce6e0b4d1655affb8f466b (patch)
tree8119826b6e569e4cbb93fa1afc869b8fab43690d /src/socket_base.hpp
parentc8e8f2a24cd339c548e06f75a3cef96454671a85 (diff)
GENERIC socket type and COMMAND flag added
GENERIC allows to use 0MQ as a dumb networking framework. It provides user with connect/disconnect notifications. Also, each inbound message is labeled by ID of the connection it originated from. Outbound messages should be labeled by the ID of the connection to send them to. To distinguish connect/disconnect notifications from common messages, COMMAND flag was introduced. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r--src/socket_base.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index fb60bbe..c7c86e7 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -128,6 +128,10 @@ namespace zmq
// handlers explicitly. If required, it will deallocate the socket.
void check_destroy ();
+ // Moves the flags from the message to local variables,
+ // to be later retrieved by getsockopt.
+ void extract_flags (msg_t *msg_);
+
// Used to check whether the object is a socket.
uint32_t tag;
@@ -182,6 +186,9 @@ namespace zmq
// True if the last message received had LABEL flag set.
bool rcvlabel;
+ // True if the last message received had COMMAND flag set.
+ bool rcvcmd;
+
// True if the last message received had MORE flag set.
bool rcvmore;