summaryrefslogtreecommitdiff
path: root/src/socket_base.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-13 14:07:30 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-13 14:07:30 +0100
commitf5ce81f2893ec0707c2f4346740878e68b51e13a (patch)
tree88e0a375594c06879b62668a81a2e2250c23a2ac /src/socket_base.hpp
parentcdc2efe9b5f0d1f45065b1c32e5eabd7e9f78a12 (diff)
Multi-hop REQ/REP, part VIII., new blob_t type used for holding identity
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r--src/socket_base.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index a2878ea..39f09de 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -23,7 +23,6 @@
#include <set>
#include <map>
#include <vector>
-#include <string>
#include "../bindings/c/zmq.h"
@@ -35,6 +34,7 @@
#include "stdint.hpp"
#include "atomic_counter.hpp"
#include "stdint.hpp"
+#include "blob.hpp"
namespace zmq
{
@@ -78,12 +78,10 @@ namespace zmq
// There are two distinct types of sessions: those identified by name
// and those identified by ordinal number. Thus two sets of session
// management functions.
- bool register_session (unsigned char peer_identity_size_,
- unsigned char *peer_identity_, class session_t *session_);
- void unregister_session (unsigned char peer_identity_size_,
- unsigned char *peer_identity_);
- class session_t *find_session (unsigned char peer_identity_size_,
- unsigned char *peer_identity_);
+ bool register_session (const blob_t &peer_identity_,
+ class session_t *session_);
+ void unregister_session (const blob_t &peer_identity_);
+ class session_t *find_session (const blob_t &peer_identity_);
uint64_t register_session (class session_t *session_);
void unregister_session (uint64_t ordinal_);
class session_t *find_session (uint64_t ordinal_);
@@ -158,7 +156,7 @@ namespace zmq
// within the socket, instead they are used by I/O objects owned by
// the socket. As those objects can live in different threads,
// the access is synchronised by mutex.
- typedef std::map <std::string, session_t*> named_sessions_t;
+ typedef std::map <blob_t, session_t*> named_sessions_t;
named_sessions_t named_sessions;
typedef std::map <uint64_t, session_t*> unnamed_sessions_t;
unnamed_sessions_t unnamed_sessions;