ZeroMQ介面函數之 :zmq_close - 關閉ZMQ socket

來源:互聯網
上載者:User

標籤:

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 <[email protected]> and Martin Lucina

<[email protected]>.

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

 

翻譯:風波

mail : [email protected]

 

ZeroMQ介面函數之 :zmq_close - 關閉ZMQ socket

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.