forked from zeromq/zeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zeps_server.xml
66 lines (57 loc) · 2.24 KB
/
zeps_server.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
65
66
<class
name = "zeps_server"
title = "ZeroMQ Enterprise Publish-Subscribe Protocol Server"
protocol_class = "zeps_msg"
package_dir = "."
project_header = "czmq.h"
>
This is a server implementation of the ZeroMQ Enterprise Publish-Subscribe protocol
<include filename = "license.xml" />
<state name = "start" inherit = "external">
<!-- Client ATTACHes and server sets up the stream and responds with ATTACH-OK -->
<event name = "ATTACH" next = "attached">
<action name = "setup stream" />
<action name = "send" message = "ATTACH-OK" />
</event>
</state>
<state name = "attached" inherit = "external">
<!-- Client SUBSCRIBEs and server responds with SUBSCRIBE-OK -->
<event name = "SUBSCRIBE">
<action name = "setup subscription" />
<action name = "send" message = "SUBSCRIBE-OK" />
</event>
<!-- Client sends CREDIT and server updates its credit value -->
<event name = "CREDIT" >
<action name = "accept credit" />
</event>
<!-- Client PUBLISHes a message and server passes it on -->
<event name = "PUBLISH" >
<action name = "publish message" />
</event>
<!-- Server DELIVERs a message to clients -->
<event name = "data recvd">
<action name = "send" message = "DELIVER" />
</event>
<!-- Client DETACHes and server responds with DETACH and terminates -->
<event name = "DETACH" next = "start">
<action name = "send" message = "DETACH-OK" />
<action name = "terminate" />
</event>
</state>
<!-- Superstate for external states -->
<state name = "external">
<!-- Peer signals it's alive -->
<event name = "PING">
<action name = "send" message = "PING-OK" />
</event>
<!-- All other protocol messages are invalid -->
<event name = "*">
<action name = "send" message = "INVALID" />
<action name = "terminate" />
</event>
<!-- This built-in event hits on a client timeout -->
<event name = "expired">
<action name = "terminate" />
</event>
</state>
</class>