-
Notifications
You must be signed in to change notification settings - Fork 20
/
zre_msg.xml
64 lines (54 loc) · 2.29 KB
/
zre_msg.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<class
name = "zre_msg"
signature = "1"
title = "work with ZRE messages"
script = "zproto_codec_go"
package_dir = "."
>
This is the ZRE protocol, version 2 draft, as defined by rfc.zeromq.org/spec:36/ZRE.
<include filename = "license.xml" />
<grammar>
zre = greeting *traffic
greeting = hello
traffic = whisper / shout / join / leave / ping / ping-ok
</grammar>
<!-- Header for all messages -->
<header>
<field name = "version" type = "number" size = "1" value = "2">Version number (2)</field>
<field name = "sequence" type = "number" size = "2">Cyclic sequence number</field>
</header>
<message name = "HELLO" id = "1">
<!-- endpoint includes transport, etc. "tcp://127.0.0.1:2225" -->
<field name = "endpoint" type = "string">Sender connect endpoint</field>
<field name = "groups" type = "strings">List of groups sender is in</field>
<field name = "status" type = "number" size = "1">Sender groups status value</field>
<field name = "name" type = "string">Sender public name</field>
<field name = "headers" type = "hash">Sender header properties</field>
Greet a peer so it can connect back to us
</message>
<message name = "WHISPER" id = "2">
<field name = "content" type = "msg">Wrapped message content</field>
Send a multi-part message to a peer
</message>
<message name = "SHOUT" id = "3">
<field name = "group" type = "string">Group to send to</field>
<field name = "content" type = "msg">Wrapped message content</field>
Send a multi-part message to a group
</message>
<message name = "JOIN" id = "4">
<field name = "group" type = "string">Name of group</field>
<field name = "status" type = "number" size = "1">Sender groups status value</field>
Join a group
</message>
<message name = "LEAVE" id = "5">
<field name = "group" type = "string">Name of group</field>
<field name = "status" type = "number" size = "1">Sender groups status value</field>
Leave a group
</message>
<message name = "PING" id = "6">
Ping a peer that has gone silent
</message>
<message name = "PING-OK" id = "7">
Reply to a peer's ping
</message>
</class>