implement zmq_unbind(),zmq_disconnect(), zmq->sock->getsockopt(ZMQ_LAST_ENDPOINT_ID)

This commit is contained in:
Sergey KHripchenko
2012-04-18 23:42:11 +04:00
parent b89a53ee7a
commit 7b8e728e43
17 changed files with 231 additions and 49 deletions

View File

@@ -39,6 +39,7 @@ namespace zmq
public:
tcp_address_t ();
tcp_address_t (const sockaddr *sa, socklen_t sa_len);
~tcp_address_t ();
// This function translates textual TCP address into an address
@@ -47,6 +48,9 @@ namespace zmq
// If 'ipv4only' is true, the name will never resolve to IPv6 address.
int resolve (const char* name_, bool local_, bool ipv4only_);
// The opposite to resolve()
virtual int to_string (std::string &addr_);
#if defined ZMQ_HAVE_WINDOWS
unsigned short family () const;
#else
@@ -79,6 +83,9 @@ namespace zmq
// Works only with remote hostnames.
int resolve (const char* name_, bool ipv4only_);
// The opposite to resolve()
int to_string (std::string &addr_);
const int mask () const;
const bool match_address (const struct sockaddr *ss, const socklen_t ss_len) const;