mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-24 09:12:30 +02:00
Small cleanups
This commit is contained in:
@@ -49,13 +49,13 @@ zmq::options_t::options_t () :
|
|||||||
delay_on_disconnect (true),
|
delay_on_disconnect (true),
|
||||||
filter (false),
|
filter (false),
|
||||||
recv_identity (false),
|
recv_identity (false),
|
||||||
|
raw_sock (false),
|
||||||
tcp_keepalive (-1),
|
tcp_keepalive (-1),
|
||||||
tcp_keepalive_cnt (-1),
|
tcp_keepalive_cnt (-1),
|
||||||
tcp_keepalive_idle (-1),
|
tcp_keepalive_idle (-1),
|
||||||
tcp_keepalive_intvl (-1),
|
tcp_keepalive_intvl (-1),
|
||||||
socket_id (0)
|
socket_id (0)
|
||||||
{
|
{
|
||||||
raw_sock = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::options_t::setsockopt (int option_, const void *optval_,
|
int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ zmq::req_session_t::req_session_t (io_thread_t *io_thread_, bool connect_,
|
|||||||
|
|
||||||
zmq::req_session_t::~req_session_t ()
|
zmq::req_session_t::~req_session_t ()
|
||||||
{
|
{
|
||||||
state = options.recv_identity ? identity : bottom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int zmq::req_session_t::push_msg (msg_t *msg_)
|
int zmq::req_session_t::push_msg (msg_t *msg_)
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#include "session_base.hpp"
|
#include "session_base.hpp"
|
||||||
#include "i_engine.hpp"
|
#include "i_engine.hpp"
|
||||||
#include "err.hpp"
|
#include "err.hpp"
|
||||||
|
|||||||
@@ -428,15 +428,11 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
|
|
||||||
// The total HWM for an inproc connection should be the sum of
|
// The total HWM for an inproc connection should be the sum of
|
||||||
// the binder's HWM and the connector's HWM.
|
// the binder's HWM and the connector's HWM.
|
||||||
int sndhwm;
|
int sndhwm = 0;
|
||||||
int rcvhwm;
|
if (options.sndhwm != 0 && peer.options.rcvhwm != 0)
|
||||||
if (options.sndhwm == 0 || peer.options.rcvhwm == 0)
|
|
||||||
sndhwm = 0;
|
|
||||||
else
|
|
||||||
sndhwm = options.sndhwm + peer.options.rcvhwm;
|
sndhwm = options.sndhwm + peer.options.rcvhwm;
|
||||||
if (options.rcvhwm == 0 || peer.options.sndhwm == 0)
|
int rcvhwm = 0;
|
||||||
rcvhwm = 0;
|
if (options.rcvhwm != 0 && peer.options.sndhwm != 0)
|
||||||
else
|
|
||||||
rcvhwm = options.rcvhwm + peer.options.sndhwm;
|
rcvhwm = options.rcvhwm + peer.options.sndhwm;
|
||||||
|
|
||||||
// Create a bi-directional pipe to connect the peers.
|
// Create a bi-directional pipe to connect the peers.
|
||||||
@@ -1034,7 +1030,7 @@ int zmq::socket_base_t::monitor (const char *addr_, int events_)
|
|||||||
|
|
||||||
// Register events to monitor
|
// Register events to monitor
|
||||||
monitor_events = events_;
|
monitor_events = events_;
|
||||||
monitor_socket = zmq_socket( get_ctx (), ZMQ_PAIR);
|
monitor_socket = zmq_socket (get_ctx (), ZMQ_PAIR);
|
||||||
if (monitor_socket == NULL)
|
if (monitor_socket == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user