Session class separated into socket-type-specific sessions

This is a preliminary patch allowing for socket-type-specific
functionality in the I/O thread. For example, message format
can be checked asynchronously and misbehaved connections dropped
straight away.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Martin Sustrik
2011-09-15 10:00:23 +02:00
parent 78b02d142e
commit f78d9b6bfc
50 changed files with 494 additions and 82 deletions

View File

@@ -52,7 +52,8 @@ namespace zmq
int init (bool udp_encapsulation_, const char *network_);
// i_engine interface implementation.
void plug (class io_thread_t *io_thread_, class session_t *session_);
void plug (class io_thread_t *io_thread_,
class session_base_t *session_);
void unplug ();
void terminate ();
void activate_in ();
@@ -105,7 +106,7 @@ namespace zmq
options_t options;
// Associated session.
class session_t *session;
class session_base_t *session;
// Most recently used decoder.
decoder_t *mru_decoder;