@@ -11,6 +11,7 @@ zmq_socket_monitor_versioned - monitor socket events
11
11
SYNOPSIS
12
12
--------
13
13
*int zmq_socket_monitor_versioned (void '*socket', char '*endpoint', uint64_t 'events', int 'event_version');*
14
+ *void zmq_socket_monitor_pipes_stats (void '*socket');*
14
15
15
16
16
17
DESCRIPTION
@@ -43,16 +44,21 @@ event number.
43
44
44
45
Unless it is specified differently, the second frame contains an event
45
46
value (64 bits) that provides additional data according to the event number.
46
- Some events might define additional value frames following the second one.
47
- The third and fourth frames contain strings that specifies the affected
48
- connection or endpoint. The third frame contains a string denoting the local
49
- endpoint, while the fourth frame contains a string denoting the remote endpoint.
47
+ The third frame contains the number of value frames that will follow it as a 64
48
+ bits integer. Each event type might have a different number of values.
49
+ The second-to-last and last frames contain strings that specifies the affected
50
+ connection or endpoint. The former frame contains a string denoting the local
51
+ endpoint, while the latter frame contains a string denoting the remote endpoint.
50
52
Either of these may be empty, depending on the event type and whether the
51
53
connection uses a bound or connected local endpoint.
52
54
53
55
Note that the format of the second and further frames, and also the number of
54
56
frames, may be different for events added in the future.
55
57
58
+ The _zmq_socket_monitor_pipes_stats()_ method triggers an event of type
59
+ ZMQ_EVENT_PIPES_STATS for each connected peer of the monitored socket.
60
+ NOTE: _zmq_socket_monitor_pipes_stats()_ is in DRAFT state.
61
+
56
62
----
57
63
Monitoring events are only generated by some transports: At the moment these
58
64
are SOCKS, TCP, IPC, and TIPC. Note that it is not an error to call
@@ -168,6 +174,24 @@ The ZMTP security mechanism handshake failed due to an authentication failure.
168
174
The event value is the status code returned by the ZAP handler (i.e. 300,
169
175
400 or 500).
170
176
177
+ ----
178
+
179
+ Supported events (v2)
180
+ ----------------
181
+
182
+ ZMQ_EVENT_PIPE_STATS
183
+ ~~~~~~~~~~~~~~~~~~~~
184
+ This event provides two values, the number of messages in each of the two
185
+ queues associated with the returned endpoint (respectively egress and ingress).
186
+ This event only triggers after calling the function
187
+ _zmq_socket_monitor_pipes_stats()_.
188
+ NOTE: this measurement is asynchronous, so by the time the message is received
189
+ the internal state might have already changed.
190
+ NOTE: when the monitored socket and the monitor are not used in a poll, the
191
+ event might not be delivered until an API has been called on the monitored
192
+ socket, like zmq_getsockopt for example (the option is irrelevant).
193
+ NOTE: in DRAFT state, not yet available in stable releases.
194
+
171
195
172
196
173
197
RETURN VALUE
0 commit comments