1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

doc: add length of field "id" in binary message (relay protocol) (closes #1233)

This commit is contained in:
Sébastien Helleu
2018-08-12 20:23:24 +02:00
parent 48cbf3ad37
commit e85bf426c1
3 changed files with 36 additions and 34 deletions
+11 -11
View File
@@ -489,23 +489,23 @@ quit
Messages are sent as binary data, using following format (with size in bytes):
....
┌────────╥─────────────╥────╥────────┬──────────╥───────╥────────┬──────────┐
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
└────────╨─────────────╨────╨────────┴──────────╨───────╨────────┴──────────┘
└──────┘ └───────────┘ └──┘ └──────┘ └────────┘ └──────┘ └────────┘
4 1 ?? 3 ?? 3 ??
└────────────────────┘ └──────────────────────────────────────────────────┘
header (5) compressed data (??)
└─────────────────────────────────────────────────────────────────────────┘
┌────────╥─────────────╥─────────╥────────┬──────────╥───────╥────────┬──────────┐
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
└────────╨─────────────╨─────────╨────────┴──────────╨───────╨────────┴──────────┘
└──────┘ └───────────┘ └───────┘ └──────┘ └────────┘ └──────┘ └────────┘
4 1 4 + str 3 ?? 3 ??
└────────────────────┘ └───────────────────────────────────────────────────────
header (5) compressed data (??)
└──────────────────────────────────────────────────────────────────────────────
_length_ bytes
....
* _length_ (unsigned integer): number of bytes of whole message (including
this field)
* _length_ (unsigned integer, 4 bytes): number of bytes of whole message
(including this field)
* _compression_ (byte): flag:
** _0x00_: following data is not compressed
** _0x01_: following data is compressed with _zlib_
* _id_ (string): identifier sent by client (before command name); it can be
* _id_ (string, 4 bytes + content): identifier sent by client (before command name); it can be
empty (string with zero length and no content) if no identifier was given in
command
* _type_ (3 chars): a type: 3 letters (see table below)
+13 -13
View File
@@ -506,25 +506,25 @@ Les messages sont envoyés sous forme de données binaires, en utilisant le form
suivant (avec la taille en octets) :
....
┌────────╥─────────────╥────╥────────┬─────────╥───────╥────────┬─────────┐
│ taille ║ compression ║ id ║ type 1 │ objet 1 ║ ... ║ type N │ objet N │
└────────╨─────────────╨────╨────────┴─────────╨───────╨────────┴─────────┘
└──────┘ └───────────┘ └──┘ └──────┘ └───────┘ └──────┘ └───────┘
4 1 ?? 3 ?? 3 ??
└────────────────────┘ └────────────────────────────────────────────────┘
en-tête (5) données compressées (??)
└───────────────────────────────────────────────────────────────────────┘
┌────────╥─────────────╥─────────╥────────┬─────────╥───────╥────────┬─────────┐
│ taille ║ compression ║ id ║ type 1 │ objet 1 ║ ... ║ type N │ objet N │
└────────╨─────────────╨─────────╨────────┴─────────╨───────╨────────┴─────────┘
└──────┘ └───────────┘ └───────┘ └──────┘ └───────┘ └──────┘ └───────┘
4 1 4 + str 3 ?? 3 ??
└────────────────────┘ └─────────────────────────────────────────────────────
en-tête (5) données compressées (??)
└────────────────────────────────────────────────────────────────────────────
'taille' octets
....
* _taille_ (entier non signé) : nombre d'octets du message entier (en incluant
ce champ)
* _taille_ (entier non signé, 4 octets) : nombre d'octets du message entier
(en incluant ce champ)
* _compression_ (octet) : drapeau :
** _0x00_ : les données qui suivent ne sont pas compressées
** _0x01_ : les données qui suivent sont compressées avec _zlib_
* _id_ (chaîne) : l'identifiant envoyé par le client (avant le nom de la
commande); il peut être vide (chaîne avec une longueur de zéro sans contenu)
si l'identifiant n'était pas donné dans la commande
* _id_ (chaîne, 4 octets + contenu) : l'identifiant envoyé par le client
(avant le nom de la commande); il peut être vide (chaîne avec une longueur
de zéro sans contenu) si l'identifiant n'était pas donné dans la commande
* _type_ (3 caractères) : un type : 3 lettres (voir le tableau ci-dessous)
* _objet_ : un objet (voir tableau ci-dessous)
+12 -10
View File
@@ -496,23 +496,25 @@ quit
メッセージは以下の書式でバイナリデータとして送信されます (サイズはバイト単位):
....
┌────────╥─────────────╥────╥────────┬──────────╥───────╥────────┬──────────┐
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
└────────╨─────────────╨────╨────────┴──────────╨───────╨────────┴──────────┘
└──────┘ └───────────┘ └──┘ └──────┘ └────────┘ └──────┘ └────────┘
4 1 ?? 3 ?? 3 ??
└────────────────────┘ └──────────────────────────────────────────────────┘
ヘッダ (5) 圧縮されたデータ (??)
└─────────────────────────────────────────────────────────────────────────┘
┌────────╥─────────────╥─────────╥────────┬──────────╥───────╥────────┬──────────┐
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
└────────╨─────────────╨─────────╨────────┴──────────╨───────╨────────┴──────────┘
└──────┘ └───────────┘ └───────┘ └──────┘ └────────┘ └──────┘ └────────┘
4 1 4 + str 3 ?? 3 ??
└────────────────────┘ └───────────────────────────────────────────────────────
ヘッダ (5) 圧縮されたデータ (??)
└──────────────────────────────────────────────────────────────────────────────
'length' バイト
....
* _length_ (符号なし整数型): メッセージ全体のバイト数
// TRANSLATION MISSING
* _length_ (符号なし整数型, 4 bytes): メッセージ全体のバイト数
(このフィールドを含む)
* _compression_ (バイト型): フラグ:
** _0x00_: これ以降のデータは圧縮されていません
** _0x01_: これ以降のデータは _zlib_ で圧縮されています
* _id_ (文字列型): クライアントが送信した識別子 (コマンド名の前につけられる);
// TRANSLATION MISSING
* _id_ (文字列型, 4 bytes + content): クライアントが送信した識別子 (コマンド名の前につけられる);
コマンドに識別子が含まれない場合は空文字列でも可
(内容を含まない長さゼロの文字列)
* _type_ (3 文字): 型の種類: 3 文字 (以下の表を参照)