From f5ce81f2893ec0707c2f4346740878e68b51e13a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 13 Feb 2010 14:07:30 +0100 Subject: Multi-hop REQ/REP, part VIII., new blob_t type used for holding identity --- src/session.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/session.hpp') diff --git a/src/session.hpp b/src/session.hpp index 7607cfb..d412728 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -20,12 +20,11 @@ #ifndef __ZMQ_SESSION_HPP_INCLUDED__ #define __ZMQ_SESSION_HPP_INCLUDED__ -#include - #include "i_inout.hpp" #include "i_endpoint.hpp" #include "owned.hpp" #include "options.hpp" +#include "blob.hpp" namespace zmq { @@ -38,11 +37,9 @@ namespace zmq session_t (object_t *parent_, socket_base_t *owner_, const options_t &options_); - // Creates named session. If name is NULL, transient session with - // auto-generated name is created. + // Creates named session. session_t (object_t *parent_, socket_base_t *owner_, - const options_t &options_, unsigned char peer_identity_size_, - unsigned char *peer_identity_); + const options_t &options_, const blob_t &peer_identity_); // i_inout interface implementation. bool read (::zmq_msg_t *msg_); @@ -68,7 +65,7 @@ namespace zmq void process_plug (); void process_unplug (); void process_attach (struct i_engine *engine_, - unsigned char peer_identity_size_, unsigned char *peer_identity_); + const blob_t &peer_identity_); // Inbound pipe, i.e. one the session is getting messages from. class reader_t *in_pipe; @@ -87,7 +84,7 @@ namespace zmq uint64_t ordinal; // Identity of the peer. - std::string peer_identity; + blob_t peer_identity; // Inherited socket options. options_t options; -- cgit v1.2.3