diff options
Diffstat (limited to 'docs/rfc.txt')
| -rw-r--r-- | docs/rfc.txt | 114 |
1 files changed, 79 insertions, 35 deletions
diff --git a/docs/rfc.txt b/docs/rfc.txt index f9e8bca..ffd2f67 100644 --- a/docs/rfc.txt +++ b/docs/rfc.txt @@ -1,7 +1,7 @@ SOLEC Working Group bt, Ed. Internet-Draft RCTT.net -Intended status: Experimental 14 April 2026 -Expires: 16 October 2026 +Intended status: Experimental 18 April 2026 +Expires: 20 October 2026 System of Lightweight Electronic Communication @@ -29,11 +29,14 @@ Table of Contents 2.4.1. Success 2.4.2. Error 2.4.3. Handshake - 2.4.4. Auth - 2.4.5. Message - 2.4.6. Test + 2.4.4. UserAuth + 2.4.5. ServerAuth + 2.4.6. Message + 2.4.7. Test 2.5. Sequential operations - 2.5.1. Connection initialisation + 2.5.1. Client-Server connection initialisation + 2.5.2. Server-Server connection initialisation + 2.6. Server 1. Introduction @@ -153,25 +156,27 @@ Table of Contents * C - Client: can be send only by a client * E - Empty: signals an event but does not carry any data - +======+===========+============+ - | Type | Name | Attributes | - +======+===========+============+ - | 0x00 | | R | - +------+-----------+------------+ - | 0x01 | Success | SCE | - +------+-----------+------------+ - | 0x02 | Error | S | - +------+-----------+------------+ - | 0x03 | Handshake | SC | - +------+-----------+------------+ - | 0x04 | Auth | C | - +------+-----------+------------+ - | 0x05 | Message | SC | - +------+-----------+------------+ - | 0xFF | Test | R | - +------+-----------+------------+ - - Table 1 + +======+============+============+ + | Type | Name | Attributes | + +======+============+============+ + | 0x00 | | R | + +------+------------+------------+ + | 0x01 | Success | SCE | + +------+------------+------------+ + | 0x02 | Error | S | + +------+------------+------------+ + | 0x03 | Handshake | SC | + +------+------------+------------+ + | 0x04 | UserAuth | C | + +------+------------+------------+ + | 0x05 | Message | SC | + +------+------------+------------+ + | 0x06 | ServerAuth | S | + +------+------------+------------+ + | 0xFF | Test | R | + +------+------------+------------+ + + Table 1 2.4.1. Success @@ -192,10 +197,12 @@ Table of Contents +======+============================================================+ | Type | Description | +======+============================================================+ - | 0x01 | Auth failed. Invalid username or password. | + | 0x01 | Client auth failed. Invalid username or password. | +------+------------------------------------------------------------+ - | 0x02 | Not found. User or channel cannot access | - | | user or channel. | + | 0x02 | Not found. User or channel cannot access user or | + | | channel. | + +------+------------------------------------------------------------+ + | 0x03 | Server auth failed. Unknown name. | +------+------------------------------------------------------------+ Table 3 @@ -231,7 +238,7 @@ Table of Contents Table 5 -2.4.4. Auth +2.4.4. UserAuth +========+==========+ | Type | Name | @@ -243,7 +250,17 @@ Table of Contents Table 6 -2.4.5. Message +2.4.5. ServerAuth + + +========+======+ + | Type | Name | + +========+======+ + | string | name | + +--------+------+ + + Table 7 + +2.4.6. Message +===========+=================+ | Type | Name | @@ -257,9 +274,9 @@ Table of Contents | string | message_content | +-----------+-----------------+ - Table 7 + Table 8 -2.4.6. Test +2.4.7. Test Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload. @@ -284,7 +301,7 @@ Table of Contents | uint64 | num4 | +-----------+-------+ - Table 8 + Table 9 2.5. Sequential operations @@ -293,7 +310,7 @@ Table of Contents this specific operation (for example incoming message) cannot interrupt this process. -2.5.1. Connection initialisation +2.5.1. Client-Server connection initialisation +--------+ +--------+ | Client | | Server | @@ -308,7 +325,7 @@ Table of Contents | +- If [ver_major] does not match server | | protocol version close the connection | | - | Send [Auth] | + | Send [UserAuth] | +--------------------------->| | | | Send [Error 0x01] | @@ -317,3 +334,30 @@ Table of Contents | | | Send [Sucesss] | |<---------------------------+ + +2.5.2. Server-Server connection initialisation + + +--------+ +--------+ + | Server | | Server | + +----+---+ +----+---+ + | | + | Initialise TCP connection | + +--------------------------->| + | | + | Send [Handshake] | + +--------------------------->| + | | + | +- If [ver_major] does not match server + | | protocol version close the connection + | | + | Send [ServerAuth] | + +--------------------------->| + | | + | Send [Error 0x03] | + |<---------------------------+- If [name] is not present in known public + | | keys list. + | | + | Send [Sucesss] | + |<---------------------------+ + +2.6. Server |
