summaryrefslogtreecommitdiffstats
path: root/solec.ksy
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-03-10 14:48:51 +0100
committerbt <bt@rctt.net>2026-03-10 14:48:51 +0100
commit69192d956aa2b6b3dbf87bac0e265e718b49dd70 (patch)
tree1f439780ffd61737701b990572d215733459f4d0 /solec.ksy
parente5644d24c51634c0e263a758bd57b797d5949c9c (diff)
downloadsolec-69192d956aa2b6b3dbf87bac0e265e718b49dd70.tar.gz
solec-69192d956aa2b6b3dbf87bac0e265e718b49dd70.zip
Update spec
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