From 923eacd28a725a6b32de588fe7a54dbe252d84aa Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 13 Feb 2010 09:09:40 +0100 Subject: Multi-hop REQ/REP, part VI., session 'name' renamed to 'peer_identity' --- src/session.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/session.hpp') diff --git a/src/session.hpp b/src/session.hpp index 2c6b462..9f8d5a8 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -41,7 +41,8 @@ namespace zmq // Creates named session. If name is NULL, transient session with // auto-generated name is created. session_t (object_t *parent_, socket_base_t *owner_, - const options_t &options_, const char *name_); + const options_t &options_, unsigned char peer_identity_size_, + unsigned char *peer_identity_); // i_inout interface implementation. bool read (::zmq_msg_t *msg_); @@ -86,12 +87,15 @@ namespace zmq unnamed } type; - // Ordinal of the session (if any). + // Session is identified by ordinal in the case when it was created + // before connection to the peer was established and thus we are + // unaware of peer's identity. uint64_t ordinal; - // The name of the session. One that is used to register it with - // socket-level repository of sessions. - std::string name; + // Identity of the peer. If the peer is anonymous, unique name is + // generated instead. Peer identity (or the generated name) is used + // register the session with socket-level repository of sessions. + std::string peer_identity; // Inherited socket options. options_t options; -- cgit v1.2.3