Skip to content

miniproto.connection.framing.TransportFrameCodec.encode_packet

miniproto.connection.framing.TransportFrameCodec.encode_packet

Section titled “miniproto.connection.framing.TransportFrameCodec.encode_packet”
encode_packet(payload: bytes, *, quick_ack: bool = False) -> bytes

Frame a bounded payload, optionally marking it for a quick ACK.

Parameters:

  • payload (bytes) – Unframed MTProto packet bytes to place on the wire.
  • quick_ack (bool) – Whether to set the mode-specific quick-ACK request flag.