mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 19:52:00 +01:00
TCP and IPC connection initiation allow for multiple properties
So far the only property passed on connection initiation was identity. The mechanism was now made extensible. Additional properties are needed to introduce functionality such as checking the peer's socket type, "subports" etc. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
@@ -21,12 +21,15 @@
|
||||
#ifndef __ZMQ_ZMQ_INIT_HPP_INCLUDED__
|
||||
#define __ZMQ_ZMQ_INIT_HPP_INCLUDED__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "../include/zmq.h"
|
||||
|
||||
#include "i_inout.hpp"
|
||||
#include "i_engine.hpp"
|
||||
#include "own.hpp"
|
||||
#include "fd.hpp"
|
||||
#include "stdint.hpp"
|
||||
#include "stdint.hpp"
|
||||
#include "blob.hpp"
|
||||
|
||||
namespace zmq
|
||||
@@ -44,6 +47,13 @@ namespace zmq
|
||||
|
||||
private:
|
||||
|
||||
// Peer property IDs.
|
||||
enum prop_t
|
||||
{
|
||||
prop_type = 1,
|
||||
prop_identity = 2
|
||||
};
|
||||
|
||||
void finalise_initialisation ();
|
||||
void dispatch_engine ();
|
||||
|
||||
@@ -63,8 +73,10 @@ namespace zmq
|
||||
// Detached transient engine.
|
||||
i_engine *ephemeral_engine;
|
||||
|
||||
// True if our own identity was already sent to the peer.
|
||||
bool sent;
|
||||
// List of messages to send to the peer during the connection
|
||||
// initiation phase.
|
||||
typedef std::vector < ::zmq_msg_t> to_send_t;
|
||||
to_send_t to_send;
|
||||
|
||||
// True if peer's identity was already received.
|
||||
bool received;
|
||||
|
||||
Reference in New Issue
Block a user