diff --git a/data/web/corefork.telegram.org/mtproto/mtproto-transports.html b/data/web/corefork.telegram.org/mtproto/mtproto-transports.html index 40c65d79d1..e77876a765 100644 --- a/data/web/corefork.telegram.org/mtproto/mtproto-transports.html +++ b/data/web/corefork.telegram.org/mtproto/mtproto-transports.html @@ -154,6 +154,14 @@ Then, payloads are wrapped in the following envelope:
0-15
Quick ACK ยป may be enabled for this transport.
+To request a quick ACK from the server for an encrypted MTProto payload, add 0x80000000
to the len
field before encoding it (equivalent to doing len = len | (1 << 31)
, i.e. set the most-significant bit of the length).
The server will send quick ACK tokens as a standalone 8 to 16-byte packet (excluding the length of the packet itself, encoded as usual), containing a 4-byte header with all bits set, followed by the ACK token (abcd
), followed by 0 to 8 random padding bytes.
+----+----+----+----...----+
+|tlen|FFFF|abcd| padding |
++----+----+----+----...----+
+These quick ACK packets can be easily distinguished from normal intermediate padded packets because their length will be always smaller than or equal to 16, smaller than any MTProto packet.
+They can be distinguished from transport errors because the first 4 bytes of the payload are equal to 0xFFFFFFFF
, not a valid transport error.
The basic MTProto transport protocol