zmq::pipe_t::pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, int inhwm_, int outhwm_, bool conflate_) : object_t (parent_), _in_pipe (inpipe_), _out_pipe (outpipe_), _in_active (true), _out_active (true), _hwm (outhwm_), _lwm (compute_lwm (inhwm_)), _in_hwm_boost (-1), _out_hwm_boost (-1), _msgs_read (0), _msgs_written (0), _peers_msgs_read (0), _peer (NULL), _sink (NULL), _state (active), _delay (true), _server_socket_routing_id (0), _conflate (conflate_) { }
zmq::pipe_t::pipe_t (object_t *reader_parent_, object_t *writer_parent_, uint64_t hwm_, int64_t swap_size_) : reader (reader_parent_, compute_lwm (hwm_)), writer (writer_parent_, hwm_, swap_size_) { reader.set_pipe (this); writer.set_pipe (this); }
void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { int in = inhwm_ + (inhwmboost > 0 ? inhwmboost : 0); int out = outhwm_ + (outhwmboost > 0 ? outhwmboost : 0); // if either send or recv side has hwm <= 0 it means infinite so we should set hwms infinite if (inhwm_ <= 0 || inhwmboost == 0) in = 0; if (outhwm_ <= 0 || outhwmboost == 0) out = 0; lwm = compute_lwm(in); hwm = out; }
void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { int in = inhwm_ + std::max (_in_hwm_boost, 0); int out = outhwm_ + std::max (_out_hwm_boost, 0); // if either send or recv side has hwm <= 0 it means infinite so we should set hwms infinite if (inhwm_ <= 0 || _in_hwm_boost == 0) in = 0; if (outhwm_ <= 0 || _out_hwm_boost == 0) out = 0; _lwm = compute_lwm (in); _hwm = out; }
zmq::pipe_t::pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, int inhwm_, int outhwm_, bool delay_) : object_t (parent_), inpipe (inpipe_), outpipe (outpipe_), in_active (true), out_active (true), hwm (outhwm_), lwm (compute_lwm (inhwm_)), msgs_read (0), msgs_written (0), peers_msgs_read (0), peer (NULL), sink (NULL), state (active), delay (delay_) { }
void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { lwm = compute_lwm (inhwm_); hwm = outhwm_; }