Commit 9ccbeb84 authored by Lourens Naudé's avatar Lourens Naudé

Let docs for zmq_ctx_set_monitor() respect a 80 char wide column width

parent 6a1bd3e1
...@@ -15,11 +15,13 @@ SYNOPSIS ...@@ -15,11 +15,13 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
----------- -----------
The _zmq_ctx_set_monitor()_ function shall register a callback function specified by The _zmq_ctx_set_monitor()_ function shall register a callback function
the 'monitor' argument. This is an event sink for changes in per socket specified by the 'monitor' argument. This is an event sink for changes in per
connection and mailbox (work in progress) states. socket connection and mailbox (work in progress) states.
.The _zmq_ctx_set_monitor()_ callback function is expected to have this
prototype:
.The _zmq_ctx_set_monitor()_ callback function is expected to have this prototype:
---- ----
typedef void (zmq_monitor_fn) (void *s, int event, zmq_event_data_t *data); typedef void (zmq_monitor_fn) (void *s, int event, zmq_event_data_t *data);
---- ----
...@@ -28,16 +30,16 @@ The callback is global (per context), with the socket that triggered the event ...@@ -28,16 +30,16 @@ The callback is global (per context), with the socket that triggered the event
passed to the handler as well. Each event also populates a 'zmq_event_data_t' passed to the handler as well. Each event also populates a 'zmq_event_data_t'
union with additional metadata which can be used for correlation. union with additional metadata which can be used for correlation.
CAUTION: _zmq_ctx_set_monitor()_ is intended for monitoring infrastructure / operations CAUTION: _zmq_ctx_set_monitor()_ is intended for monitoring infrastructure /
concerns only - NOT BUSINESS LOGIC. An event is a representation of something operations concerns only - NOT BUSINESS LOGIC. An event is a representation of
that happened - you cannot change the past, but only react to them. The something that happened - you cannot change the past, but only react to them.
implementation is also only concerned with a single session. No state of peers, The implementation is also only concerned with a single session. No state of
other sessions etc. are tracked - this will only pollute internals and is the peers, other sessions etc. are tracked - this will only pollute internals and
responsibility of application authors to either implement or correlate in is the responsibility of application authors to either implement or correlate
another datastore. Monitor events are exceptional conditions and are thus not in another datastore. Monitor events are exceptional conditions and are thus
directly in the messaging critical path. However, still be careful with what not directly in the messaging critical path. However, still be careful with
you're doing in the callback function as excess time spent in the handler will what you're doing in the callback function as excess time spent in the handler
block the socket's application thread. will block the socket's application thread.
Only tcp and ipc specific transport events are supported in this initial Only tcp and ipc specific transport events are supported in this initial
implementation. implementation.
...@@ -158,9 +160,9 @@ data.disconnected.fd // socket descriptor ...@@ -158,9 +160,9 @@ data.disconnected.fd // socket descriptor
RETURN VALUE RETURN VALUE
------------ ------------
The _zmq_ctx_set_monitor()_ function returns a value of 0 or greater if successful. The _zmq_ctx_set_monitor()_ function returns a value of 0 or greater if
Otherwise it returns `-1` and sets 'errno' to one of the values defined successful. Otherwise it returns `-1` and sets 'errno' to one of the values
below. defined below.
ERRORS ERRORS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment