miniproto.connection.framing
miniproto.connection.framing
Section titled “miniproto.connection.framing”Stateful MTProto TCP transport framing.
The codec is deliberately independent from sockets: callers may feed arbitrary fragments, and every complete frame is drained before another read is needed.
Public objects
Section titled “Public objects”PayloadFrame— A decoded MTProto transport payload.QuickAckFrame— A transport-level quick acknowledgement emitted by Telegram.TransportErrorFrame— A negative MTProto transport error code decoded from a frame.FrameEvent— Public attributeminiproto.connection.framing.FrameEvent.TransportFrameCodec— Incrementally encode and decode one MTProto TCP framing mode.PythonFrameCodec— Pure-Python incremental encoder/decoder for Telegram TCP transports.NativeFrameCodec— Typed adapter around the bundled Rust frame pump.native_transport_available— Return whether the imported native module exposesTransportCodec.create_frame_codec— Create the fastest available codec for one MTProto TCP framing mode.