Add a disconnect method (interface to the zmq_disconnect call) in the socket_t class

This commit is contained in:
Emmanuel Taurel 2013-06-26 17:04:45 +02:00
parent b232978003
commit 3afc98efa1

View File

@ -358,6 +358,13 @@ namespace zmq
throw error_t ();
}
inline void disconnect (const char *addr_)
{
int rc = zmq_disconnect (ptr, addr_);
if (rc != 0)
throw error_t ();
}
inline bool connected()
{
return(ptr != NULL);