From bf78e230ad4736da9fce6e0b4d1655affb8f466b Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sun, 17 Jul 2011 23:31:29 +0200 Subject: 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 --- src/socket_base.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/socket_base.hpp') 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; -- cgit v1.2.3