You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/zmq_proxy_steerable.txt
+97-4
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ zmq_proxy_steerable(3)
3
3
4
4
NAME
5
5
----
6
-
zmq_proxy_steerable - DEPRECATED
6
+
zmq_proxy_steerable - built-in 0MQ proxy with control flow
7
7
8
8
9
9
SYNOPSIS
@@ -14,9 +14,102 @@ SYNOPSIS
14
14
15
15
DESCRIPTION
16
16
-----------
17
-
The _zmq_proxy_steerable()_ function is an empty stub that only returns an
18
-
*EOPNOTSUPP* error, as the author did not provide a relicense agreement for
19
-
the Mozilla Public License v2 relicense of libzmq.
17
+
18
+
The _zmq_proxy_steerable()_ function is a variant of the _zmq_proxy()_ function.
19
+
It accepts a fourth _control_ socket. When the _control_ socket is _NULL_ the
20
+
two functions operate identically.
21
+
22
+
When a _control_ socket of type _REP_ is provided to the proxy function the
23
+
application may send commands to the proxy. The following commands are
24
+
supported.
25
+
26
+
_PAUSE_::
27
+
The proxy will cease transferring messages between its endpoints.
28
+
29
+
_RESUME_::
30
+
The proxy will resume transferring messages between its endpoints.
31
+
32
+
_TERMINATE_::
33
+
The proxy function will exit with a return value of 0.
34
+
35
+
_STATISTICS_::
36
+
The proxy behavior will remain unchanged and reply with a set of simple summary values of the messages that have been sent through the proxy as described next.
37
+
38
+
There are eight statistics values, each of size _uint64_t_ in the multi-part
39
+
message reply to the _STATISTICS_ command. These are:
40
+
41
+
- number of messages received by the frontend socket
42
+
43
+
- number of bytes received by the frontend socket
44
+
45
+
- number of messages sent by the frontend socket
46
+
47
+
- number of bytes sent by the frontend socket
48
+
49
+
- number of messages received by the backend socket
50
+
51
+
- number of bytes received by the backend socket
52
+
53
+
- number of messages sent by the backend socket
54
+
55
+
- number of bytes sent by the backend socket
56
+
57
+
58
+
RETURN VALUE
59
+
------------
60
+
The _zmq_proxy_steerable()_ function returns 0 if TERMINATE is received on its
61
+
control socket. Otherwise, it returns -1 and errno set to ETERM or EINTR (the
62
+
0MQ context associated with either of the specified sockets was terminated) or
63
+
EFAULT (the provided frontend or backend was invalid).
64
+
65
+
66
+
EXAMPLE
67
+
-------
68
+
.Create a function to run the proxy
69
+
----
70
+
// Create the frontend and backend sockets to be proxied
0 commit comments