From 37190b05b522890388d22f55d11d456635e89559 Mon Sep 17 00:00:00 2001 From: bt Date: Sun, 29 Mar 2026 22:11:02 +0200 Subject: [docs] Use sequence diagram for sequential operations description --- docs/rfc.html | 41 +++++++++++++++++++++++++---------------- docs/rfc.md | 31 ++++++++++++++++++++++++------- docs/rfc.txt | 31 ++++++++++++++++++++++--------- 3 files changed, 71 insertions(+), 32 deletions(-) diff --git a/docs/rfc.html b/docs/rfc.html index 62a6738..86eaadf 100644 --- a/docs/rfc.html +++ b/docs/rfc.html @@ -1802,22 +1802,31 @@ specific operation (for example incoming message) cannot interrupt this process.

2.5.1. Connection initialisation

- +
+
+--------+                   +--------+
+| Client |                   | Server |
++----+---+                   +----+---+
+     |                            |
+     | Initialise TCP connection  |
+     +--------------------------->|
+     |                            |
+     | Send [Handshake]           |
+     +--------------------------->|
+     |                            |
+     |                            +- If [ver_major] does not match server
+     |                            |  protocol version close the connection
+     |                            |
+     | Send [Auth]                |
+     +--------------------------->|
+     |                            |
+     | Send [Error 0x01]          |
+     |<---------------------------+- If [username] or [password] does not match
+     |                            |  and close the connection
+     |                            |
+     | Send [Sucesss]             |
+     |<---------------------------+
+
+
diff --git a/docs/rfc.md b/docs/rfc.md index 3bed7fc..6f902b0 100644 --- a/docs/rfc.md +++ b/docs/rfc.md @@ -226,10 +226,27 @@ specific operation (for example incoming message) cannot interrupt this process. ### Connection initialisation -- Client: Initialise TCP connection. -- Client: Send *handshake*. -- Server: If *major* version of protocol differs close the connection. -- Server: Otherwise send *handshake*. -- Client: Send *auth*. -- Server: If user credentials does not match send *error* with *auth_failed*. -- Server: Otherwise send *success*. +~~~ ascii-art ++--------+ +--------+ +| Client | | Server | ++----+---+ +----+---+ + | | + | Initialise TCP connection | + +--------------------------->| + | | + | Send [Handshake] | + +--------------------------->| + | | + | +- If [ver_major] does not match server + | | protocol version close the connection + | | + | Send [Auth] | + +--------------------------->| + | | + | Send [Error 0x01] | + |<---------------------------+- If [username] or [password] does not match + | | and close the connection + | | + | Send [Sucesss] | + |<---------------------------+ +~~~ \ No newline at end of file diff --git a/docs/rfc.txt b/docs/rfc.txt index 02ad60a..1b2371a 100644 --- a/docs/rfc.txt +++ b/docs/rfc.txt @@ -273,12 +273,25 @@ Table of Contents 2.5.1. Connection initialisation - * Client: Initialise TCP connection. - * Client: Send _handshake_. - * Server: If _major_ version of protocol differs close the - connection. - * Server: Otherwise send _handshake_. - * Client: Send _auth_. - * Server: If user credentials does not match send _error_ with - _auth_failed_. - * Server: Otherwise send _success_. + +--------+ +--------+ + | Client | | Server | + +----+---+ +----+---+ + | | + | Initialise TCP connection | + +--------------------------->| + | | + | Send [Handshake] | + +--------------------------->| + | | + | +- If [ver_major] does not match server + | | protocol version close the connection + | | + | Send [Auth] | + +--------------------------->| + | | + | Send [Error 0x01] | + |<---------------------------+- If [username] or [password] does not match + | | and close the connection + | | + | Send [Sucesss] | + |<---------------------------+ -- cgit v1.2.3