Created
September 10, 2015 20:05
-
-
Save hintjens/545d884f9be9346b5237 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<class | |
name = "sadl_msg" | |
title = "The SADL Message Protocol" | |
script = "zproto_codec_c" | |
package_dir = "." | |
> | |
This implements the wireframe SADL protocol | |
<message name = "PUBLISH"> | |
Client sends data to a topic | |
<field name = "sender" type = "string" /> | |
<field name = "topic" type = "string" /> | |
<field name = "data" type = "string" /> | |
</message> | |
<message name = "OK"> | |
Server confirms command was successful | |
</message> | |
<message name = "ERROR"> | |
Server reports command failure | |
<field name = "reason" type = "string" /> | |
</message> | |
<message name = "SUBSCRIBE"> | |
Client subscribes to a topic | |
<field name = "sender" type = "string" /> | |
<field name = "topic" type = "string" /> | |
</message> | |
<message name = "CANCEL"> | |
Client cancels a topic | |
<field name = "sender" type = "string" /> | |
<field name = "topic" type = "string" /> | |
</message> | |
<message name = "FETCH"> | |
Client asks for a message, if any | |
<field name = "sender" type = "string" /> | |
</message> | |
<message name = "DELIVER"> | |
Server delivers a message to the client | |
<field name = "topic" type = "string" /> | |
<field name = "data" type = "string" /> | |
</message> | |
<message name = "EMPTY"> | |
Server reports there was nothing to deliver | |
</message> | |
<message name = "SENDTO"> | |
Client sends a message to another client | |
<field name = "sender" type = "string" /> | |
<field name = "recipient" type = "string" /> | |
<field name = "data" type = "string" /> | |
</message> | |
</class> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment