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

@@ -26,7 +26,7 @@
#include "err.hpp"
#include "pipe.hpp"
#include "io_thread.hpp"
#include "session.hpp"
#include "session_base.hpp"
#include "socket_base.hpp"
zmq::object_t::object_t (ctx_t *ctx_, uint32_t tid_) :
@@ -201,8 +201,8 @@ void zmq::object_t::send_own (own_t *destination_, own_t *object_)
send_command (cmd);
}
void zmq::object_t::send_attach (session_t *destination_, i_engine *engine_,
bool inc_seqnum_)
void zmq::object_t::send_attach (session_base_t *destination_,
i_engine *engine_, bool inc_seqnum_)
{
if (inc_seqnum_)
destination_->inc_seqnum ();