mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 21:56:25 +01:00
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:
@@ -29,7 +29,7 @@
|
||||
#include "stream_engine.hpp"
|
||||
#include "ipc_address.hpp"
|
||||
#include "io_thread.hpp"
|
||||
#include "session.hpp"
|
||||
#include "session_base.hpp"
|
||||
#include "config.hpp"
|
||||
#include "err.hpp"
|
||||
#include "ip.hpp"
|
||||
@@ -87,9 +87,9 @@ void zmq::ipc_listener_t::in_event ()
|
||||
zmq_assert (io_thread);
|
||||
|
||||
// Create and launch a session object.
|
||||
session_t *session = new (std::nothrow)
|
||||
session_t (io_thread, false, socket, options, NULL, NULL);
|
||||
alloc_assert (session);
|
||||
session_base_t *session = session_base_t::create (io_thread, false, socket,
|
||||
options, NULL, NULL);
|
||||
errno_assert (session);
|
||||
session->inc_seqnum ();
|
||||
launch_child (session);
|
||||
send_attach (session, engine, false);
|
||||
|
||||
Reference in New Issue
Block a user