Re-exports§
pub use mtp_sender::MtpSender;pub use sender_task::FrameEvent;pub use sender_task::ReconnectRequest;pub use sender_task::RpcEnqueue;pub use sender_task::SenderHandle;pub use sender_task::spawn_sender_task;
Modules§
- mtp_
sender - Single-task MTProto sender.
- sender_
task - The sender task: a single
tokio::spawn-ed loop that ownsMtpSenderand is the only entity that touches the TCP socket.
Structs§
- Auto
Sleep - Automatically sleep on
FLOOD_WAITand retry once on transient I/O errors. - Circuit
Breaker - A
RetryPolicythat stops retrying afterthresholdconsecutive failures and stays silent for acooldownwindow before resetting. - Conn
Slot - One slot in the per-DC connection pool.
- DcConnection
- DcPool
- Pool of per-DC authenticated connections. Each DC holds up to MAX_CONNS_PER_DC slots. The pool lock is dropped before any network I/O so concurrent callers don’t serialize on it.
- NoRetries
- Never retry: propagate every error immediately.
- Retry
Context - Context passed to
RetryPolicy::should_retryon each failure. - Retry
Loop - Drives the retry loop for a single RPC call.
- RpcError
- An error returned by Telegram’s servers in response to an RPC call.
Enums§
- Invocation
Error - The error type returned from any
Clientmethod that talks to Telegram.
Traits§
- Retry
Policy - Controls how the client reacts when an RPC call fails.