zmq_term(3)

zmq_term(3)

ØMQ Manual - ØMQ/2.0.11

Name

zmq_term - terminate ØMQ context

Synopsis

int zmq_term (void *context);

Description

The zmq_term() function terminates the ØMQ context context.

If there are no longer any sockets open within context at the time zmq_term() is called then context shall be shut down and all associated resources shall be released immediately.

Otherwise, the following applies:

  • The zmq_term() function shall return immediately.
  • Any blocking operations currently in progress on sockets open within context shall return immediately with an error code of ETERM.
  • With the exception of zmq_close(), any further operations on sockets open within context shall fail with an error code of ETERM.
  • The actual shutdown of context, and release of any associated resources, shall be delayed until the last socket within it is closed with zmq_close().

Return value

The zmq_term() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

Errors

EFAULT
The provided context was not valid (NULL).

See also

zmq(7) zmq_init(3)

Authors

This ØMQ manual page was written by Martin Sustrik <moc.mpb052|kirtsus#moc.mpb052|kirtsus> and Martin Lucina <ks.anletok|otam#ks.anletok|otam>.