aboutsummaryrefslogtreecommitdiff
path: root/xC-proto
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-08 02:33:44 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-08 02:45:37 +0200
commit8c3ee80b21278eaa6fb29f73b79c16d443923dfa (patch)
treec943fe17e888c75c17ff7c9866373ac23acb4d45 /xC-proto
parent3a165a595ba75958d360a61fdb173b19f71096dd (diff)
downloadxK-8c3ee80b21278eaa6fb29f73b79c16d443923dfa.tar.gz
xK-8c3ee80b21278eaa6fb29f73b79c16d443923dfa.tar.xz
xK-8c3ee80b21278eaa6fb29f73b79c16d443923dfa.zip
xC/xP: finalize and implement Event.PING
Diffstat (limited to 'xC-proto')
-rw-r--r--xC-proto22
1 files changed, 14 insertions, 8 deletions
diff --git a/xC-proto b/xC-proto
index c44f095..fd06491 100644
--- a/xC-proto
+++ b/xC-proto
@@ -8,11 +8,12 @@ struct CommandMessage {
u32 command_seq;
union CommandData switch (enum Command {
HELLO,
- PING,
ACTIVE,
- BUFFER_COMPLETE,
BUFFER_INPUT,
BUFFER_ACTIVATE,
+ PING_RESPONSE,
+ PING,
+ BUFFER_COMPLETE,
BUFFER_LOG,
} command) {
case HELLO:
@@ -20,19 +21,24 @@ struct CommandMessage {
// If the version check succeeds, the client will receive
// an initial stream of BUFFER_UPDATE, BUFFER_LINE,
// and finally a BUFFER_ACTIVATE message.
- case PING:
- void;
case ACTIVE:
void;
- case BUFFER_COMPLETE:
- string buffer_name;
- string text;
- u32 position;
case BUFFER_INPUT:
string buffer_name;
string text;
case BUFFER_ACTIVATE:
string buffer_name;
+ case PING_RESPONSE:
+ u32 event_seq;
+
+ // Only these commands may produce Event.RESPONSE, as below,
+ // but any command may produce an error.
+ case PING:
+ void;
+ case BUFFER_COMPLETE:
+ string buffer_name;
+ string text;
+ u32 position;
case BUFFER_LOG:
string buffer_name;
} data;