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

@@ -25,6 +25,7 @@
#include <deque>
#include "socket_base.hpp"
#include "session_base.hpp"
#include "stdint.hpp"
#include "msg.hpp"
#include "fq.hpp"
@@ -102,6 +103,21 @@ namespace zmq
const router_t &operator = (const router_t&);
};
class router_session_t : public session_base_t
{
public:
router_session_t (class io_thread_t *io_thread_, bool connect_,
class socket_base_t *socket_, const options_t &options_,
const char *protocol_, const char *address_);
~router_session_t ();
private:
router_session_t (const router_session_t&);
const router_session_t &operator = (const router_session_t&);
};
}
#endif