Files
telemt/src/stream/mod.rs
T

50 lines
1.3 KiB
Rust
Raw Normal View History

2025-12-30 05:08:05 +03:00
//! Stream wrappers for MTProto protocol layers
2026-01-01 23:34:04 +03:00
pub mod state;
pub mod buffer_pool;
2025-12-30 05:08:05 +03:00
pub mod traits;
pub mod crypto_stream;
pub mod tls_stream;
pub mod frame;
pub mod frame_codec;
// Legacy compatibility - will be removed later
2025-12-30 05:08:05 +03:00
pub mod frame_stream;
2026-01-01 23:34:04 +03:00
// Re-export state machine types
2026-02-24 03:40:59 +03:00
#[allow(unused_imports)]
2026-01-01 23:34:04 +03:00
pub use state::{
StreamState, Transition, PollResult,
ReadBuffer, WriteBuffer, HeaderBuffer, YieldBuffer,
};
// Re-export buffer pool
2026-02-24 03:40:59 +03:00
#[allow(unused_imports)]
2026-01-01 23:34:04 +03:00
pub use buffer_pool::{BufferPool, PooledBuffer, PoolStats};
// Re-export stream implementations
2026-02-24 03:40:59 +03:00
#[allow(unused_imports)]
2025-12-30 05:08:05 +03:00
pub use crypto_stream::{CryptoReader, CryptoWriter, PassthroughStream};
pub use tls_stream::{FakeTlsReader, FakeTlsWriter};
// Re-export frame types
2026-02-24 03:40:59 +03:00
#[allow(unused_imports)]
pub use frame::{Frame, FrameMeta, FrameCodec as FrameCodecTrait, create_codec};
2026-02-24 03:40:59 +03:00
// Re-export tokio-util compatible codecs
#[allow(unused_imports)]
pub use frame_codec::{
FrameCodec,
AbridgedCodec, IntermediateCodec, SecureCodec,
};
// Legacy re-exports for compatibility
2026-02-24 03:40:59 +03:00
#[allow(unused_imports)]
pub use frame_stream::{
AbridgedFrameReader, AbridgedFrameWriter,
IntermediateFrameReader, IntermediateFrameWriter,
SecureIntermediateFrameReader, SecureIntermediateFrameWriter,
MtprotoFrameReader, MtprotoFrameWriter,
FrameReaderKind, FrameWriterKind,
2026-02-21 02:15:10 +03:00
};