ZeroMQ official address:http://api.zeromq.org/4-2:zmq_unbind
Zmq_unbind (3) ØMQ Manual-ømq/4.1.0
Name
Zmq_unbind- stop connecting to foreign requests
Synopsis
int zmq_unbind (voidconstchar *endpoint);
Description
The Zmq_unbind () function will bind the socket specified by the socket parameter to the endpoint The specified endpoint is unbound.
The endpoint parameter is the parameter in the function zmq_bind (3) .
Return value
function zmq_unbind () execution successfully returns 0. Otherwise , 1is returned, and the value of errno is set to the value defined below.
Errors
EINVAL
Endpoint parameter is not available.
Eterm
The ZMQ context associated with the socket specified by the socket parameter has been terminated.
Enotsock
Socket parameter is not available.
Example
Binds a distributor socket from The TCP transport mode
1 /*Create a zmq_sub socket*/2 void*socket =zmq_socket (context, zmq_sub);3 assert (socket);4 /*Connect it to the host server001, Port 5555 using a TCP transport*/5rc = Zmq_bind (socket,"tcp://127.0.0.1:5555");6ASSERT (rc = =0);7 /*Disconnect from the previously connected endpoint*/8rc = Zmq_unbind (socket,"tcp://127.0.0.1:5555"); ASSERT (rc = =0);
See Also
Zmq_bind (3) Zmq_socket (3) ZMQ (7)
Authors
This page was written by the ømq community. to make a change please read the ømq contribution policy at http:// Www.zeromq.org/docs:contributing.
WEB site design and content is copyright (c) 2007-2012 Imatix Corporation. Contact us for professional support. Site content licensed under the Creative Commons attribution-share alike 3.0 License. ØMQ is copyright (c) Copyright (c) 2007-2012 Imatix Corporation and Contributors. ØMQ is free software licensed under the LGPL. ØMQ, ZeroMQ, and 0MQ are trademarks of Imatix Corporation. Terms of Use - Privacy
Policy
More ZeroMQ API:http://www.cnblogs.com/fengbohello/p/4230135.html
Translation: The Storm
Mail: [Email protected]
Zeromq interface function: Zmq_unbind-stop connection to foreign requests