summaryrefslogtreecommitdiffstats
path: root/solec.ksy
diff options
context:
space:
mode:
Diffstat (limited to 'solec.ksy')
-rw-r--r--solec.ksy21
1 files changed, 21 insertions, 0 deletions
diff --git a/solec.ksy b/solec.ksy
index 01c7481..82f3bf7 100644
--- a/solec.ksy
+++ b/solec.ksy
@@ -21,6 +21,10 @@ seq:
type:
switch-on: payload_type
cases:
+ 'type::handshake': handshake
+ 'type::ping': ping
+ 'type::pong': pong
+# 'type::message': message
'type::test': test
types:
@@ -32,13 +36,30 @@ types:
type: str
size: len_payload
encoding: UTF-8
+
binary:
seq:
- id: len_payload
type: u2
- id: payload
size: len_payload
+
+ handshake:
+ seq:
+ - id: proto_ver_major
+ type: u1
+ - id: proto_ver_minor
+ type: u1
+
+ ping: {}
+
+ pong:
+ seq:
+ - id: timestamp
+ type: u8
+
test:
+ doc: Test payload, used for parsers testing
seq:
- id: num1
type: u1