mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 03:20:13 +01:00
Added ZMQ_STREAM socket type
- designed for TCP clients and servers - added HTTP client / server example in tests/test_stream.cpp - same as ZMQ_ROUTER + ZMQ_ROUTER_RAW + ZMQ_ROUTER_MANDATORY - includes b893ce set ZMQ_IDENTITY on outgoing connect - deprecates ZMQ_ROUTER_RAW
This commit is contained in:
@@ -33,7 +33,8 @@ zmq::router_t::router_t (class ctx_t *parent_, uint32_t tid_, int sid_) :
|
||||
more_out (false),
|
||||
next_peer_id (generate_random ()),
|
||||
mandatory (false),
|
||||
raw_sock (false),
|
||||
// raw_sock functionality in ROUTER is deprecated
|
||||
raw_sock (false),
|
||||
probe_router (false)
|
||||
{
|
||||
options.type = ZMQ_ROUTER;
|
||||
@@ -272,7 +273,6 @@ int zmq::router_t::xrecv (msg_t *msg_)
|
||||
// It's possible that we receive peer's identity. That happens
|
||||
// after reconnection. The current implementation assumes that
|
||||
// the peer always uses the same identity.
|
||||
// TODO: handle the situation when the peer changes its identity.
|
||||
while (rc == 0 && msg_->is_identity ())
|
||||
rc = fq.recvpipe (msg_, &pipe);
|
||||
|
||||
@@ -372,9 +372,6 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
|
||||
buf [0] = 0;
|
||||
put_uint32 (buf + 1, next_peer_id++);
|
||||
identity = blob_t (buf, sizeof buf);
|
||||
unsigned int i = 0; // Store identity to allow use of raw socket as client
|
||||
for (blob_t::iterator it = identity.begin(); it != identity.end(); it++) options.identity[i++] = *it;
|
||||
options.identity_size = i;
|
||||
}
|
||||
else {
|
||||
msg.init ();
|
||||
|
||||
Reference in New Issue
Block a user