You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/protocol/specification.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,17 +13,16 @@ As noted earlier, Skyhash is a client/server protocol built on top of TCP, that
13
13
-**Client handshake**: The client sends a handshake packet
14
14
- The handshake contains all necessary information to successfully establish a connection
15
15
- The structure of the client handshake depends on the authentication plugin in use (since authentication data has to be exchanged before the connection can be established)
16
-
- For the `pwd` plugin the client handshake looks like this (split into lines for convenience):
16
+
- For the `pwd` plugin the client handshake looks like this:
> For the protocol compatibility code, [see the version matrix](/protocol/#version-matrix)
20
+
- For the protocol compatibility code, [see the version matrix](/protocol/#version-matrix)
21
+
- Please note that `0` means integer value `0` (`0x00`) and NOT the ASCII digit 0
22
+
- Both the `<username length>` and `<password length>` are the respective lengths encoded as ASCII strings
24
23
- **Server handshake**:
25
-
- **Accepted:** If the server accepts the handshake information then it will respond with: `H000`
26
-
- **Rejected**: If the server rejects the handshake information then it will respond with `H01<8-bit error code>`. You can find out what happened using [the error code index](errors)
24
+
- **Accepted:** If the server accepts the handshake information then it will respond with: `H000` (all the numeric values are integers and NOT ASCII digits)
25
+
- **Rejected**: If the server rejects the handshake information then it will respond with `H01<8-bit error code>` (all the numeric values are integers and NOT ASCII digits). You can find out what happened using [the error code index](errors)
27
26
- Data exchange stage: This is where the client and server send and receive data. A client and server will spend the majority of their time in this stage.
28
27
- Termination stage: Once the connection is no longer needed, the client (or in exceptional cases, the server) will close the connection using a simple TCP FIN.
0 commit comments