diff options
Diffstat (limited to 'docs/rfc.md')
| -rw-r--r-- | docs/rfc.md | 86 |
1 files changed, 29 insertions, 57 deletions
diff --git a/docs/rfc.md b/docs/rfc.md index db79839..3bed7fc 100644 --- a/docs/rfc.md +++ b/docs/rfc.md @@ -113,6 +113,8 @@ spec](https://go.dev/ref/spec#Numeric_types). Following types are in use: * uint32 * uint64 +Number in numeric type name is number of bits used to encode this type. + ### Timestamp Uint64 containing Unix timestamp in UTC timezone. @@ -167,13 +169,9 @@ Payload is always empty for this type. ### Error -~~~ ascii-art - 0 - 0 1 2 3 4 5 6 7 - +-+-+-+-+-+-+-+-+ - | Error Type | - +-+-+-+-+-+-+-+-+ - ~~~ +| Type | Name | +|-------|------------| +| uint8 | error_type | #### Error types @@ -183,68 +181,42 @@ Payload is always empty for this type. ### Handshake -~~~ ascii-art - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | ver_major | ver_minor | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|-------|-----------| +| uint8 | ver_major | +| uint8 | ver_minor | ### Auth -~~~ ascii-art - 0 1 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | username (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | password (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|--------|----------| +| string | username | +| string | password | ### Message -~~~ ascii-art - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | source_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | target_address (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | timestamp | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | message_content (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ - - +| Type | Name | +|-----------|-----------------| +| string | source_address | +| string | target_address | +| timestamp | send_time | +| string | message_content | ### Test Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload. -~~~ ascii-art - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num1 (uint8) | time1 (timestamp) | - | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| - | | str1 (string) ... - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num2 (uint16) | str2 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num3 (uint32) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | str3 (string) | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | num4 (uint64) | - | | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -~~~ +| Type | Name | +|-----------|-------| +| uint8 | num1 | +| timestamp | time1 | +| string | str1 | +| uint16 | num2 | +| string | str2 | +| uint32 | num3 | +| string | str3 | +| uint64 | num4 | ## Sequential operations |
