mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 16:56:11 +01:00
Problem: Usage of "rid" in server_t
Solution: Replaced by "routing_id"
This commit is contained in:
parent
e00131dd43
commit
ae2ea1a655
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
zmq::server_t::server_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
zmq::server_t::server_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
||||||
socket_base_t (parent_, tid_, sid_, true),
|
socket_base_t (parent_, tid_, sid_, true),
|
||||||
next_rid (generate_random ())
|
next_routing_id (generate_random ())
|
||||||
{
|
{
|
||||||
options.type = ZMQ_SERVER;
|
options.type = ZMQ_SERVER;
|
||||||
}
|
}
|
||||||
@ -54,9 +54,9 @@ void zmq::server_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
|
|||||||
|
|
||||||
zmq_assert (pipe_);
|
zmq_assert (pipe_);
|
||||||
|
|
||||||
uint32_t routing_id = next_rid++;
|
uint32_t routing_id = next_routing_id++;
|
||||||
if (!routing_id)
|
if (!routing_id)
|
||||||
routing_id = next_rid++; // Never use RID zero
|
routing_id = next_routing_id++; // Never use Routing ID zero
|
||||||
|
|
||||||
pipe_->set_server_socket_routing_id (routing_id);
|
pipe_->set_server_socket_routing_id (routing_id);
|
||||||
// Add the record into output pipes lookup table
|
// Add the record into output pipes lookup table
|
||||||
|
@ -85,7 +85,7 @@ namespace zmq
|
|||||||
|
|
||||||
// Routing IDs are generated. It's a simple increment and wrap-over
|
// Routing IDs are generated. It's a simple increment and wrap-over
|
||||||
// algorithm. This value is the next ID to use (if not used already).
|
// algorithm. This value is the next ID to use (if not used already).
|
||||||
uint32_t next_rid;
|
uint32_t next_routing_id;
|
||||||
|
|
||||||
server_t (const server_t&);
|
server_t (const server_t&);
|
||||||
const server_t &operator = (const server_t&);
|
const server_t &operator = (const server_t&);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user