mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-09 15:53:59 +01:00
First attempt at inproc connect before bind
This commit is contained in:
13
src/ctx.hpp
13
src/ctx.hpp
@@ -40,6 +40,7 @@ namespace zmq
|
||||
class io_thread_t;
|
||||
class socket_base_t;
|
||||
class reaper_t;
|
||||
class pipe_t;
|
||||
|
||||
// Information associated with inproc endpoint. Note that endpoint options
|
||||
// are registered as well so that the peer can access them without a need
|
||||
@@ -50,6 +51,12 @@ namespace zmq
|
||||
options_t options;
|
||||
};
|
||||
|
||||
struct pending_connection_t
|
||||
{
|
||||
socket_base_t *socket;
|
||||
pipe_t* pipe;
|
||||
};
|
||||
|
||||
// Context object encapsulates all the global state associated with
|
||||
// the library.
|
||||
|
||||
@@ -101,6 +108,8 @@ namespace zmq
|
||||
int register_endpoint (const char *addr_, endpoint_t &endpoint_);
|
||||
void unregister_endpoints (zmq::socket_base_t *socket_);
|
||||
endpoint_t find_endpoint (const char *addr_);
|
||||
void pend_connection (const char *addr_, const pending_connection_t &pending_connection_);
|
||||
pending_connection_t next_pending_connection (const char *addr_);
|
||||
|
||||
enum {
|
||||
term_tid = 0,
|
||||
@@ -156,6 +165,10 @@ namespace zmq
|
||||
typedef std::map <std::string, endpoint_t> endpoints_t;
|
||||
endpoints_t endpoints;
|
||||
|
||||
// List of inproc connection endpoints pending a bind
|
||||
typedef std::map <std::string, pending_connection_t> pending_connections_t;
|
||||
pending_connections_t pending_connections;
|
||||
|
||||
// Synchronisation of access to the list of inproc endpoints.
|
||||
mutex_t endpoints_sync;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user