miniproto.connection.sender.MTProtoSender.send
miniproto.connection.sender.MTProtoSender.send
Section titled “miniproto.connection.sender.MTProtoSender.send”send(body: bytes | object, *, content_related: bool = True) -> intSend a one-way encrypted message and return its MTProto message ID.
Parameters:
- body (
bytes | object) – Encoded bytes or serializable TL body to encrypt and send. - content_related (
bool) – Whether sequence allocation marks the message as content-related; defaults toTrue.
Returns:
int– The allocated message ID after the packet is accepted by the localint– transport write path.
Raises:
TransportError– If connection or send/recovery fails.
Notes
This does not create a result future and may retry a raw transport write once during recovery. It serializes with all requests.