Code cleanup

- limit visibility of pending_connection_t
- add const qualifiers
This commit is contained in:
Martin Hurton
2014-05-21 13:05:56 +02:00
parent 96501d7271
commit 414fc86b22
5 changed files with 26 additions and 20 deletions

View File

@@ -51,13 +51,6 @@ namespace zmq
options_t options;
};
struct pending_connection_t
{
endpoint_t endpoint;
pipe_t* connect_pipe;
pipe_t* bind_pipe;
};
// Context object encapsulates all the global state associated with
// the library.
@@ -109,7 +102,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_, pending_connection_t &pending_connection_);
void pend_connection (const std::string &addr_,
const endpoint_t &endpoint_, pipe_t **pipes_);
void connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_);
enum {
@@ -121,6 +115,12 @@ namespace zmq
private:
struct pending_connection_t
{
endpoint_t endpoint;
pipe_t* connect_pipe;
pipe_t* bind_pipe;
};
// Used to check whether the object is a context.
uint32_t tag;
@@ -196,7 +196,7 @@ namespace zmq
pid_t pid;
#endif
enum side { connect_side, bind_side };
void connect_inproc_sockets(zmq::socket_base_t *bind_socket_, options_t& bind_options, pending_connection_t &pending_connection_, side side_);
void connect_inproc_sockets(zmq::socket_base_t *bind_socket_, options_t& bind_options, const pending_connection_t &pending_connection_, side side_);
};
}