|
1 |
| -<class name="zyre"> |
| 1 | +<class name = "zyre"> |
2 | 2 | An open-source framework for proximity-based P2P apps
|
3 | 3 |
|
4 | 4 | <include filename = "../license.xml" />
|
|
8 | 8 | node it is silent and invisible to other nodes on the network.
|
9 | 9 | The node name is provided to other nodes during discovery. If you
|
10 | 10 | specify NULL, Zyre generates a randomized node name from the UUID.
|
11 |
| - <argument name="name" type="string" /> |
| 11 | + <argument name = "name" type = "string" /> |
12 | 12 | </constructor>
|
13 | 13 |
|
14 | 14 | <destructor>
|
15 | 15 | Destructor, destroys a Zyre node. When you destroy a node, any
|
16 | 16 | messages it is sending or receiving will be discarded.
|
17 | 17 | </destructor>
|
18 | 18 |
|
19 |
| - <method name="uuid"> |
| 19 | + <method name = "uuid"> |
20 | 20 | Return our node UUID string, after successful initialization
|
21 |
| - <return type="string" /> |
| 21 | + <return type = "string" /> |
22 | 22 | </method>
|
23 | 23 |
|
24 |
| - <method name="name"> |
| 24 | + <method name = "name"> |
25 | 25 | Return our node name, after successful initialization
|
26 |
| - <return type="string" /> |
| 26 | + <return type = "string" /> |
27 | 27 | </method>
|
28 | 28 |
|
29 |
| - <method name="set_header"> |
| 29 | + <method name = "set_header"> |
30 | 30 | Set node header; these are provided to other nodes during discovery
|
31 | 31 | and come in each ENTER message.
|
32 |
| - <argument name="name" type="string" /> |
33 |
| - <argument name="format" type="format" /> |
| 32 | + <argument name = "name" type = "string" /> |
| 33 | + <argument name = "format" type = "format" /> |
34 | 34 | </method>
|
35 | 35 |
|
36 |
| - <method name="set_verbose"> |
| 36 | + <method name = "set_verbose"> |
37 | 37 | Set verbose mode; this tells the node to log all traffic as well as
|
38 | 38 | all major events.
|
39 | 39 | </method>
|
40 | 40 |
|
41 |
| - <method name="set_port"> |
| 41 | + <method name = "set_port"> |
42 | 42 | Set UDP beacon discovery port; defaults to 5670, this call overrides
|
43 | 43 | that so you can create independent clusters on the same network, for
|
44 | 44 | e.g. development vs. production. Has no effect after zyre_start().
|
45 |
| - <argument name="port_nbr" type="integer" /> |
| 45 | + <argument name = "port_nbr" type = "integer" /> |
46 | 46 | </method>
|
47 | 47 |
|
48 |
| - <method name="set_interval"> |
| 48 | + <method name = "set_interval"> |
49 | 49 | Set UDP beacon discovery interval, in milliseconds. Default is instant
|
50 | 50 | beacon exploration followed by pinging every 1,000 msecs.
|
51 |
| - <argument name="interval" type="size" /> |
| 51 | + <argument name = "interval" type = "size" /> |
52 | 52 | </method>
|
53 | 53 |
|
54 |
| - <method name="set_interface"> |
| 54 | + <method name = "set_interface"> |
55 | 55 | Set network interface for UDP beacons. If you do not set this, CZMQ will
|
56 | 56 | choose an interface for you. On boxes with several interfaces you should
|
57 | 57 | specify which one you want to use, or strange things can happen.
|
58 |
| - <argument name="value" type="string" /> |
| 58 | + <argument name = "value" type = "string" /> |
59 | 59 | </method>
|
60 | 60 |
|
61 |
| - <method name="set_endpoint"> |
| 61 | + <method name = "set_endpoint"> |
62 | 62 | By default, Zyre binds to an ephemeral TCP port and broadcasts the local
|
63 | 63 | host name using UDP beaconing. When you call this method, Zyre will use
|
64 | 64 | gossip discovery instead of UDP beaconing. You MUST set-up the gossip
|
|
67 | 67 | inproc://, ipc://, or tcp:// transports (for tcp://, use an IP address
|
68 | 68 | that is meaningful to remote as well as local nodes). Returns 0 if
|
69 | 69 | the bind was successful, else -1.
|
70 |
| - <argument name="format" type="format" /> |
71 |
| - <return type="integer" /> |
| 70 | + <argument name = "format" type = "format" /> |
| 71 | + <return type = "integer" /> |
72 | 72 | </method>
|
73 | 73 |
|
74 |
| - <method name="gossip_bind"> |
| 74 | + <method name = "gossip_bind"> |
75 | 75 | Set-up gossip discovery of other nodes. At least one node in the cluster
|
76 | 76 | must bind to a well-known gossip endpoint, so other nodes can connect to
|
77 | 77 | it. Note that gossip endpoints are completely distinct from Zyre node
|
78 | 78 | endpoints, and should not overlap (they can use the same transport).
|
79 |
| - <argument name="format" type="format" /> |
| 79 | + <argument name = "format" type = "format" /> |
80 | 80 | </method>
|
81 | 81 |
|
82 |
| - <method name="gossip_connect"> |
| 82 | + <method name = "gossip_connect"> |
83 | 83 | Set-up gossip discovery of other nodes. A node may connect to multiple
|
84 | 84 | other nodes, for redundancy paths. For details of the gossip network
|
85 | 85 | design, see the CZMQ zgossip class.
|
86 |
| - <argument name="format" type="format" /> |
| 86 | + <argument name = "format" type = "format" /> |
87 | 87 | </method>
|
88 | 88 |
|
89 |
| - <method name="start"> |
| 89 | + <method name = "start"> |
90 | 90 | Start node, after setting header values. When you start a node it
|
91 | 91 | begins discovery and connection. Returns 0 if OK, -1 if it wasn't
|
92 | 92 | possible to start the node.
|
93 |
| - <return type="integer" /> |
| 93 | + <return type = "integer" /> |
94 | 94 | </method>
|
95 | 95 |
|
96 |
| - <method name="stop"> |
| 96 | + <method name = "stop"> |
97 | 97 | Stop node; this signals to other peers that this node will go away.
|
98 | 98 | This is polite; however you can also just destroy the node without
|
99 | 99 | stopping it.
|
100 | 100 | </method>
|
101 | 101 |
|
102 |
| - <method name="join"> |
| 102 | + <method name = "join"> |
103 | 103 | Join a named group; after joining a group you can send messages to
|
104 | 104 | the group and all Zyre nodes in that group will receive them.
|
105 |
| - <argument name="group" type="string" /> |
106 |
| - <return type="integer" /> |
| 105 | + <argument name = "group" type = "string" /> |
| 106 | + <return type = "integer" /> |
107 | 107 | </method>
|
108 | 108 |
|
109 |
| - <method name="leave"> |
| 109 | + <method name = "leave"> |
110 | 110 | Leave a group
|
111 |
| - <argument name="group" type="string" /> |
112 |
| - <return type="integer" /> |
| 111 | + <argument name = "group" type = "string" /> |
| 112 | + <return type = "integer" /> |
113 | 113 | </method>
|
114 | 114 |
|
115 |
| - <method name="recv"> |
| 115 | + <method name = "recv"> |
116 | 116 | Receive next message from network; the message may be a control
|
117 | 117 | message (ENTER, EXIT, JOIN, LEAVE) or data (WHISPER, SHOUT).
|
118 | 118 | Returns zmsg_t object, or NULL if interrupted
|
119 |
| - <return type="zmsg" /> |
| 119 | + <return type = "zmsg" /> |
120 | 120 | </method>
|
121 | 121 |
|
122 |
| - <method name="whisper"> |
| 122 | + <method name = "whisper"> |
123 | 123 | Send message to single peer, specified as a UUID string
|
124 | 124 | Destroys message after sending
|
125 |
| - <argument name="peer" type="string" /> |
126 |
| - <argument name="msg_p" type="zmsg" by_reference="1" /> |
127 |
| - <return type="integer" /> |
| 125 | + <argument name = "peer" type = "string" /> |
| 126 | + <argument name = "msg_p" type = "zmsg" by_reference = "1" /> |
| 127 | + <return type = "integer" /> |
128 | 128 | </method>
|
129 | 129 |
|
130 |
| - <method name="shout"> |
| 130 | + <method name = "shout"> |
131 | 131 | Send message to a named group
|
132 | 132 | Destroys message after sending
|
133 |
| - <argument name="group" type="string" /> |
134 |
| - <argument name="msg_p" type="zmsg" by_reference="1" /> |
135 |
| - <return type="integer" /> |
| 133 | + <argument name = "group" type = "string" /> |
| 134 | + <argument name = "msg_p" type = "zmsg" by_reference = "1" /> |
| 135 | + <return type = "integer" /> |
136 | 136 | </method>
|
137 | 137 |
|
138 |
| - <method name="whispers"> |
| 138 | + <method name = "whispers"> |
139 | 139 | Send formatted string to a single peer specified as UUID string
|
140 |
| - <argument name="peer" type="string" /> |
141 |
| - <argument name="format" type="format" /> |
142 |
| - <return type="integer" /> |
| 140 | + <argument name = "peer" type = "string" /> |
| 141 | + <argument name = "format" type = "format" /> |
| 142 | + <return type = "integer" /> |
143 | 143 | </method>
|
144 | 144 |
|
145 |
| - <method name="shouts"> |
| 145 | + <method name = "shouts"> |
146 | 146 | Send formatted string to a named group
|
147 |
| - <argument name="group" type="string" /> |
148 |
| - <argument name="format" type="format" /> |
149 |
| - <return type="integer" /> |
| 147 | + <argument name = "group" type = "string" /> |
| 148 | + <argument name = "format" type = "format" /> |
| 149 | + <return type = "integer" /> |
150 | 150 | </method>
|
151 | 151 |
|
152 |
| - <method name="peers"> |
153 |
| - Return zlist of current peer ids. |
154 |
| - <return type="zlist" fresh="1" /> |
| 152 | + <method name = "peers"> |
| 153 | + Return zlist of current peer ids. |
| 154 | + <return type = "zlist" fresh = "1" /> |
155 | 155 | </method>
|
156 | 156 |
|
157 |
| - <method name="own_groups"> |
158 |
| - Return zlist of currently joined groups. |
159 |
| - <return type="zlist" fresh="1" /> |
| 157 | + <method name = "own_groups"> |
| 158 | + Return zlist of currently joined groups. |
| 159 | + <return type = "zlist" fresh = "1" /> |
160 | 160 | </method>
|
161 | 161 |
|
162 |
| - <method name="peer_groups"> |
163 |
| - Return zlist of groups known through connected peers. |
164 |
| - <return type="zlist" fresh="1" /> |
| 162 | + <method name = "peer_groups"> |
| 163 | + Return zlist of groups known through connected peers. |
| 164 | + <return type = "zlist" fresh = "1" /> |
165 | 165 | </method>
|
166 | 166 |
|
167 |
| - <method name="peer_address"> |
168 |
| - Return the endpoint of a connected peer. |
169 |
| - <argument name="peer" type="string" /> |
170 |
| - <return type="string" fresh="1" /> |
| 167 | + <method name = "peer_address"> |
| 168 | + Return the endpoint of a connected peer. |
| 169 | + <argument name = "peer" type = "string" /> |
| 170 | + <return type = "string" fresh = "1" /> |
171 | 171 | </method>
|
172 | 172 |
|
173 |
| - <method name="peer_header_value"> |
| 173 | + <method name = "peer_header_value"> |
174 | 174 | Return the value of a header of a conected peer.
|
175 |
| - Returns null if peer or key doesn't exist. |
176 |
| - <argument name="peer" type="string" /> |
177 |
| - <argument name="name" type="string" /> |
178 |
| - <return type="string" fresh="1" /> |
| 175 | + Returns null if peer or key doesn't exits. |
| 176 | + <argument name = "peer" type = "string" /> |
| 177 | + <argument name = "name" type = "string" /> |
| 178 | + <return type = "string" fresh = "1" /> |
179 | 179 | </method>
|
180 | 180 |
|
181 |
| - <method name="socket"> |
| 181 | + <method name = "socket"> |
182 | 182 | Return socket for talking to the Zyre node, for polling
|
183 |
| - <return type="zsock" /> |
| 183 | + <return type = "zsock" /> |
184 | 184 | </method>
|
185 | 185 |
|
186 |
| - <method name="version" singleton="1"> |
| 186 | + <method name = "version" singleton = "1"> |
187 | 187 | Return the Zyre version for run-time API detection
|
188 |
| - <argument name="major" type="integer" by_reference="1" /> |
189 |
| - <argument name="minor" type="integer" by_reference="1" /> |
190 |
| - <argument name="patch" type="integer" by_reference="1" /> |
| 188 | + <argument name = "major" type = "integer" by_reference = "1" /> |
| 189 | + <argument name = "minor" type = "integer" by_reference = "1" /> |
| 190 | + <argument name = "patch" type = "integer" by_reference = "1" /> |
191 | 191 | </method>
|
192 | 192 |
|
193 |
| - <method name="test" singleton="1"> |
| 193 | + <method name = "test" singleton = "1"> |
194 | 194 | Self test of this class
|
195 |
| - <argument name="verbose" type="boolean" /> |
| 195 | + <argument name = "verbose" type = "boolean" /> |
196 | 196 | </method>
|
197 | 197 |
|
198 | 198 | </class>
|
0 commit comments