ZeroMQ 官方地址 :http://api.zeromq.org/4-0:zmq_close
zmq_close(3) ØMQ Manual - ØMQ/3.2.5
Name
zmq_close - 關閉ZMQ socket
Synopsis
int zmq_close (void *socket);
Description
zmq_close()函數會銷毀由socket參數指定的socket。任何從網絡上接收了但沒有被應用程序使用zmq_recv()接收的消息都將會被丟棄。已經使用zmq_send() 發送的消息,但是還沒有被設備發送到網絡中的消息的處理方式,將由socket的 ZMQ_LINGER 值決定。
默認的ZMQ_LINGER值通常是不會丟棄沒有發送的消息;這樣的話,當調用zmq_term()函數時可能會導致應用程序阻塞。更多細節請參見zmq_setsockopt(3) 和zmq_term(3)。
Return value
如果執行成功,zmq_close()函數會返回0。其它情況則返回-1,並且設置errno為下列值。
Errors
ENOTSOCK
所提供的socket無法使用。
See also
zmq_socket(3) zmq_term(3) zmq_setsockopt(3) zmq(7)
Authors
This ØMQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and Martin Lucina
<mato@kotelna.sk>.
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
更多 ZeroMQ API :http://www.cnblogs.com/fengbohello/p/4230135.html
翻譯:風波
mail : fengbohello@qq.com