summaryrefslogtreecommitdiffstats
path: root/PROTOCOL.md
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-03-25 23:44:41 +0100
committerbt <bt@rctt.net>2026-03-29 08:45:42 +0200
commit19a65f220bf326dd46f143c8292fa55d2b5c9bc3 (patch)
tree50c8d5fda912a4734cc951c316ee2c73474eab96 /PROTOCOL.md
parentcaf73ee626b409e2318d93370908264b6dbbe67f (diff)
downloadsolec-19a65f220bf326dd46f143c8292fa55d2b5c9bc3.tar.gz
solec-19a65f220bf326dd46f143c8292fa55d2b5c9bc3.zip
[docs] Rewrite docs
Diffstat (limited to 'PROTOCOL.md')
-rw-r--r--PROTOCOL.md87
1 files changed, 0 insertions, 87 deletions
diff --git a/PROTOCOL.md b/PROTOCOL.md
deleted file mode 100644
index b6d249e..0000000
--- a/PROTOCOL.md
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--- --------------------------------------------------------------------- -->
-
-# SOLEC protocol specification
-
-## Data format
-
-* Payload can contain multiple numeric types or binary data in a single frame
-* Numeric types are big endian
-* See [test payload](#Test) for an example of complex data structure
-
-### Frame structure
-
-| Type | Description |
-|----------|----------------|
-| `uint8` | Payload type |
-| `uint16` | Payload length |
-| `any` | Payload |
-
-
-### Special types
-
-#### Strings and binary
-
-Strings and binary data are prefixed wtith 2 bytes denoting their length.
-Strings are UTF-8 encoded.
-
-#### Timestamps
-
-Timestamps are stored as `uint64` in [Unix format](https://en.wikipedia.org/wiki/Unix_time).
-Timezone is always set to UTC.
-
-### Payloads
-
-All payload types are described in following files:
-
-* [Kaitai Struct](https://git.sr.ht/~rctt/solec/blob/main/solec.ksy)
-* [SVG graph](https://git.sr.ht/~rctt/solec/blob/main/solec.svg)
-
-## Client-server connection initialization
-
-1. Initialize TCP connection
-2. Receive `handshake`
-3. Send `hadnshake`
-4. Send `auth`
-5. Receive `success` or `error`
-
-## Client-server messaging
-
-After successfull auth server will listen for payloads of `message` type.
-Sending different payload will result in error and connection will be closed
-by the server.
-
-Message consist of following fields:
-* Source - address of the user sending a message
-* Target - address of channel or user receiving a message
-* Timestamp - set by user sending a message, UTC timezone
-* Content - UTF-8 string
-
-## Addresses
-
-Source and target addresses are similair to e-mail addresses. There are two
-parts separated by `@` where second part is address of the server where
-specific user or channel is registered on.
-
-Target addresses is set to user that created specific message. Messaegs can be
-relayed between servers so it's necessary to keep that info as part of the
-message.
-
-Channel addresses always starts from `#` to distinct them from user addresses.
-Because of that user address cannot start from this character.
-
-Channels can be grouped in a hierarchy. Levels of channels hierarchy are
-separated by `.`.
-
-`*` is special address reserved for broadcast messages send by the server
-administrator.
-
-| Type | Address |
-|-----------|----------------------|
-| user | user@example.org |
-| channel | #channel@example.org |
-| broadcast | *@example.org |
-
-## Channels hierarchy
-
-Channels can be groupped into a hierarchy. Channels hierarchy can be used to
-simplify moderation and management. \ No newline at end of file