diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-03-16 13:26:23 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-03-16 13:26:23 +0100 |
commit | 32ded2b457b2102dba4c15e00363f031d212b1c4 (patch) | |
tree | 163f0540f5f26277ba934bc80671a7c4fc73b7ad /src/session.hpp | |
parent | b79d07b8bc844135c44c1ff8b84b50dc08f56925 (diff) |
Duplicate identities now checked with zmq_connect
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/session.hpp')
-rw-r--r-- | src/session.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/session.hpp b/src/session.hpp index 499c074..570daa1 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -69,12 +69,16 @@ namespace zmq void terminate (); // Two events for the derived session type. Attached is triggered - // when session is attached to a peer, detached is triggered at the - // beginning of the termination process when session is about to - // be detached from the peer. - virtual void attached (const blob_t &peer_identity_) = 0; + // when session is attached to a peer. The function can reject the new + // peer by returning false. Detached is triggered at the beginning of + // the termination process when session is about to be detached from + // the peer. + virtual bool attached (const blob_t &peer_identity_) = 0; virtual void detached () = 0; + // Returns true if there is an engine attached to the session. + bool has_engine (); + // Allows derives session types to (un)register session names. bool register_session (const blob_t &name_, class session_t *session_); void unregister_session (const blob_t &name_); |