Module grammers_mtproto::mtp
source · Expand description
Implementation of the Mobile Transport Protocol. This layer is responsible for converting zero or more input requests into outgoing messages, and to process the response.
A distinction between plain and encrypted is made for simplicity (the plain hardly requires to process any state) and to help prevent invalid states (encrypted communication cannot be made without an authorization key).
Structs§
- Results from the deserialization of a response.
- An implementation of the Mobile Transport Protocol for ciphertext (encrypted) messages.
- An implementation of the Mobile Transport Protocol for plaintext (unencrypted) messages.
- The error type reported by the server when a request is misused.
Enums§
- The error type for the deserialization of server messages.
- This error occurs when a Remote Procedure call was unsuccessful.
Constants§
- Data prepended after encrypting a packet,
key_id
andmsg_key
. - The maximum header length used by any available transport (
Full
, 4 bytes forlen
andseq
). - The message header for the container occupies the size of the message header (
msg_id
,seq_no
andsize
) followed by the container header (constructor
,len
). - The first actual message comes after
salt
,client_id
(8 bytes each).
Traits§
- The trait used by the Mobile Transport Protocol to serialize outgoing messages and deserialize incoming ones into proper responses.