mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 18:40:28 +01:00
Add a disconnect method (interface to the zmq_disconnect call) in the socket_t class
This commit is contained in:
parent
b232978003
commit
3afc98efa1
7
zmq.hpp
7
zmq.hpp
@ -358,6 +358,13 @@ namespace zmq
|
|||||||
throw error_t ();
|
throw error_t ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void disconnect (const char *addr_)
|
||||||
|
{
|
||||||
|
int rc = zmq_disconnect (ptr, addr_);
|
||||||
|
if (rc != 0)
|
||||||
|
throw error_t ();
|
||||||
|
}
|
||||||
|
|
||||||
inline bool connected()
|
inline bool connected()
|
||||||
{
|
{
|
||||||
return(ptr != NULL);
|
return(ptr != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user