zmq_ctx_destroy.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. zmq_ctx_destroy(3)
  2. ==================
  3. NAME
  4. ----
  5. zmq_ctx_destroy - terminate a 0MQ context
  6. SYNOPSIS
  7. --------
  8. *int zmq_ctx_destroy (void '*context');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_ctx_destroy()_ function shall destroy the 0MQ context 'context'.
  12. Context termination is performed in the following steps:
  13. 1. Any blocking operations currently in progress on sockets open within
  14. 'context' shall return immediately with an error code of ETERM. With the
  15. exception of _zmq_close()_, any further operations on sockets open within
  16. 'context' shall fail with an error code of ETERM.
  17. 2. After interrupting all blocking calls, _zmq_ctx_destroy()_ shall _block_ until the
  18. following conditions are satisfied:
  19. * All sockets open within 'context' have been closed with _zmq_close()_.
  20. * For each socket within 'context', all messages sent by the application
  21. with _zmq_send()_ have either been physically transferred to a network
  22. peer, or the socket's linger period set with the _ZMQ_LINGER_ socket
  23. option has expired.
  24. For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_
  25. option in linkzmq:zmq_setsockopt[3].
  26. This function is deprecated by linkzmq:zmq_ctx_term[3].
  27. RETURN VALUE
  28. ------------
  29. The _zmq_ctx_destroy()_ function shall return zero if successful. Otherwise
  30. it shall return `-1` and set 'errno' to one of the values defined below.
  31. ERRORS
  32. ------
  33. *EFAULT*::
  34. The provided 'context' was invalid.
  35. *EINTR*::
  36. Termination was interrupted by a signal. It can be restarted if needed.
  37. SEE ALSO
  38. --------
  39. linkzmq:zmq[7]
  40. linkzmq:zmq_init[3]
  41. linkzmq:zmq_close[3]
  42. linkzmq:zmq_setsockopt[3]
  43. AUTHORS
  44. -------
  45. This page was written by the 0MQ community. To make a change please
  46. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.