mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
renamed from zs to zmq
This commit is contained in:
@@ -27,33 +27,33 @@
|
||||
#include "simple_semaphore.hpp"
|
||||
#include "i_engine.hpp"
|
||||
|
||||
zs::object_t::object_t (dispatcher_t *dispatcher_, int thread_slot_) :
|
||||
zmq::object_t::object_t (dispatcher_t *dispatcher_, int thread_slot_) :
|
||||
dispatcher (dispatcher_),
|
||||
thread_slot (thread_slot_)
|
||||
{
|
||||
}
|
||||
|
||||
zs::object_t::object_t (object_t *parent_) :
|
||||
zmq::object_t::object_t (object_t *parent_) :
|
||||
dispatcher (parent_->dispatcher),
|
||||
thread_slot (parent_->thread_slot)
|
||||
{
|
||||
}
|
||||
|
||||
zs::object_t::~object_t ()
|
||||
zmq::object_t::~object_t ()
|
||||
{
|
||||
}
|
||||
|
||||
int zs::object_t::thread_slot_count ()
|
||||
int zmq::object_t::thread_slot_count ()
|
||||
{
|
||||
return dispatcher->thread_slot_count ();
|
||||
}
|
||||
|
||||
int zs::object_t::get_thread_slot ()
|
||||
int zmq::object_t::get_thread_slot ()
|
||||
{
|
||||
return thread_slot;
|
||||
}
|
||||
|
||||
void zs::object_t::process_command (command_t &cmd_)
|
||||
void zmq::object_t::process_command (command_t &cmd_)
|
||||
{
|
||||
switch (cmd_.type) {
|
||||
|
||||
@@ -99,11 +99,11 @@ void zs::object_t::process_command (command_t &cmd_)
|
||||
return;
|
||||
|
||||
default:
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
}
|
||||
|
||||
void zs::object_t::create_pipe (object_t *reader_parent_,
|
||||
void zmq::object_t::create_pipe (object_t *reader_parent_,
|
||||
object_t *writer_parent_, uint64_t hwm_, uint64_t lwm_,
|
||||
pipe_reader_t **reader_, pipe_writer_t **writer_)
|
||||
{
|
||||
@@ -111,33 +111,33 @@ void zs::object_t::create_pipe (object_t *reader_parent_,
|
||||
reader_, writer_);
|
||||
}
|
||||
|
||||
void zs::object_t::destroy_pipe (pipe_t *pipe_)
|
||||
void zmq::object_t::destroy_pipe (pipe_t *pipe_)
|
||||
{
|
||||
dispatcher->destroy_pipe (pipe_);
|
||||
}
|
||||
|
||||
int zs::object_t::register_inproc_endpoint (const char *endpoint_,
|
||||
int zmq::object_t::register_inproc_endpoint (const char *endpoint_,
|
||||
session_t *session_)
|
||||
{
|
||||
return dispatcher->register_inproc_endpoint (endpoint_, session_);
|
||||
}
|
||||
|
||||
zs::object_t *zs::object_t::get_inproc_endpoint (const char *endpoint_)
|
||||
zmq::object_t *zmq::object_t::get_inproc_endpoint (const char *endpoint_)
|
||||
{
|
||||
return dispatcher->get_inproc_endpoint (endpoint_);
|
||||
}
|
||||
|
||||
void zs::object_t::unregister_inproc_endpoints (session_t *session_)
|
||||
void zmq::object_t::unregister_inproc_endpoints (session_t *session_)
|
||||
{
|
||||
dispatcher->unregister_inproc_endpoints (session_);
|
||||
}
|
||||
|
||||
zs::io_thread_t *zs::object_t::choose_io_thread (uint64_t taskset_)
|
||||
zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t taskset_)
|
||||
{
|
||||
return dispatcher->choose_io_thread (taskset_);
|
||||
}
|
||||
|
||||
void zs::object_t::send_stop ()
|
||||
void zmq::object_t::send_stop ()
|
||||
{
|
||||
// Send command goes always to the current object. To-self pipe is
|
||||
// used exclusively for sending this command.
|
||||
@@ -147,7 +147,7 @@ void zs::object_t::send_stop ()
|
||||
dispatcher->write (thread_slot, thread_slot, cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_bind (object_t *destination_, pipe_reader_t *reader_,
|
||||
void zmq::object_t::send_bind (object_t *destination_, pipe_reader_t *reader_,
|
||||
session_t *peer_)
|
||||
{
|
||||
command_t cmd;
|
||||
@@ -158,7 +158,7 @@ void zs::object_t::send_bind (object_t *destination_, pipe_reader_t *reader_,
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_head (object_t *destination_, uint64_t bytes_)
|
||||
void zmq::object_t::send_head (object_t *destination_, uint64_t bytes_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -167,7 +167,7 @@ void zs::object_t::send_head (object_t *destination_, uint64_t bytes_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_tail (object_t *destination_, uint64_t bytes_)
|
||||
void zmq::object_t::send_tail (object_t *destination_, uint64_t bytes_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -176,7 +176,7 @@ void zs::object_t::send_tail (object_t *destination_, uint64_t bytes_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_reg (object_t *destination_, simple_semaphore_t *smph_)
|
||||
void zmq::object_t::send_reg (object_t *destination_, simple_semaphore_t *smph_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -185,7 +185,7 @@ void zs::object_t::send_reg (object_t *destination_, simple_semaphore_t *smph_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_reg_and_bind (object_t *destination_,
|
||||
void zmq::object_t::send_reg_and_bind (object_t *destination_,
|
||||
session_t *peer_, bool flow_in_, bool flow_out_)
|
||||
{
|
||||
command_t cmd;
|
||||
@@ -197,7 +197,7 @@ void zs::object_t::send_reg_and_bind (object_t *destination_,
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_unreg (object_t *destination_,
|
||||
void zmq::object_t::send_unreg (object_t *destination_,
|
||||
simple_semaphore_t *smph_)
|
||||
{
|
||||
command_t cmd;
|
||||
@@ -207,7 +207,7 @@ void zs::object_t::send_unreg (object_t *destination_,
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_engine (object_t *destination_, i_engine *engine_)
|
||||
void zmq::object_t::send_engine (object_t *destination_, i_engine *engine_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -216,7 +216,7 @@ void zs::object_t::send_engine (object_t *destination_, i_engine *engine_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_terminate (object_t *destination_)
|
||||
void zmq::object_t::send_terminate (object_t *destination_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -224,7 +224,7 @@ void zs::object_t::send_terminate (object_t *destination_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::send_terminate_ack (object_t *destination_)
|
||||
void zmq::object_t::send_terminate_ack (object_t *destination_)
|
||||
{
|
||||
command_t cmd;
|
||||
cmd.destination = destination_;
|
||||
@@ -232,58 +232,58 @@ void zs::object_t::send_terminate_ack (object_t *destination_)
|
||||
send_command (cmd);
|
||||
}
|
||||
|
||||
void zs::object_t::process_stop ()
|
||||
void zmq::object_t::process_stop ()
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_bind (pipe_reader_t *reader_, session_t *peer_)
|
||||
void zmq::object_t::process_bind (pipe_reader_t *reader_, session_t *peer_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_head (uint64_t bytes_)
|
||||
void zmq::object_t::process_head (uint64_t bytes_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_tail (uint64_t bytes_)
|
||||
void zmq::object_t::process_tail (uint64_t bytes_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_reg (simple_semaphore_t *smph_)
|
||||
void zmq::object_t::process_reg (simple_semaphore_t *smph_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_reg_and_bind (session_t *session_,
|
||||
void zmq::object_t::process_reg_and_bind (session_t *session_,
|
||||
bool flow_in_, bool flow_out_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_unreg (simple_semaphore_t *smph_)
|
||||
void zmq::object_t::process_unreg (simple_semaphore_t *smph_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_engine (i_engine *engine_)
|
||||
void zmq::object_t::process_engine (i_engine *engine_)
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_terminate ()
|
||||
void zmq::object_t::process_terminate ()
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::process_terminate_ack ()
|
||||
void zmq::object_t::process_terminate_ack ()
|
||||
{
|
||||
zs_assert (false);
|
||||
zmq_assert (false);
|
||||
}
|
||||
|
||||
void zs::object_t::send_command (command_t &cmd_)
|
||||
void zmq::object_t::send_command (command_t &cmd_)
|
||||
{
|
||||
int destination_thread_slot = cmd_.destination->get_thread_slot ();
|
||||
if (destination_thread_slot == thread_slot)
|
||||
|
||||
Reference in New Issue
Block a user