From ebd1a1b0a928decb96fa2ed3e3b6b0c62b5cb845 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Tue, 12 Nov 2019 21:51:29 +0400 Subject: [PATCH] Add information about BaseMessage --- protocol-spec/core.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/protocol-spec/core.md b/protocol-spec/core.md index 1736bb5..c6336b1 100644 --- a/protocol-spec/core.md +++ b/protocol-spec/core.md @@ -12,4 +12,17 @@ **Server-part (hostname)** - `IPv4 / [IPv6] / dns-domain:`. **Username/Room alias/RoomID** - MUST NOT be empty, and MUST contain only the characters `a-z`, `0-9`, `.`, `_`, `=`, `-`, and `/`. -RoomID SHOULD be UUID identifier. \ No newline at end of file +RoomID SHOULD be UUID identifier. + +## BaseMessage +BaseMessage is a basic message model, basis of the whole protocol. It is used for a very easy protocol extension process. + +BaseMessage scheme: +``` +id (string) - identifier of message (used to track the request-response chain) +type (string) - type of message (used to determine which extension this message belongs to) +from (EntityID) - from which entity this message is send +to (EntityID) - message recipient +ok (boolean) - operation success indicator (used to determine if errors was happened when processing request) +payload (Map) - message payload (used to store extra information in message, list of permissible fields in the payload are depends on "type" field) +``` \ No newline at end of file