pub struct TokioTcp;Implementations§
Source§impl TokioTcp
impl TokioTcp
Sourcepub fn outgoing_connection<A>(
addr: A,
chunk_size: usize,
) -> Flow<Vec<u8>, Vec<u8>, StreamCompletion<TcpConnection>>
pub fn outgoing_connection<A>( addr: A, chunk_size: usize, ) -> Flow<Vec<u8>, Vec<u8>, StreamCompletion<TcpConnection>>
Opens a plain TCP outgoing connection as a coupled byte flow.
TLS and QUIC carriers live in the datum-net satellite crate. Reads are bounded by a
capacity-1 channel: once one chunk is waiting for downstream demand, the Tokio task stops
reading until the stream consumes it. The flow does not hide an unbounded receive buffer.
Panics if chunk_size == 0.
Sourcepub fn outgoing_connection_default<A>(
addr: A,
) -> Flow<Vec<u8>, Vec<u8>, StreamCompletion<TcpConnection>>
pub fn outgoing_connection_default<A>( addr: A, ) -> Flow<Vec<u8>, Vec<u8>, StreamCompletion<TcpConnection>>
TokioTcp::outgoing_connection with the default 8 KiB chunk size.
Sourcepub fn bind<A>(
addr: A,
chunk_size: usize,
) -> Source<TcpIncomingConnection, StreamCompletion<TcpBinding>>
pub fn bind<A>( addr: A, chunk_size: usize, ) -> Source<TcpIncomingConnection, StreamCompletion<TcpBinding>>
Binds a plain TCP listener and emits accepted incoming connections.
Each accepted connection carries independent byte source/sink halves and can be converted
into a coupled flow. The accept loop is demand-gated: one downstream pull permits one Tokio
accept. The materialized TcpBinding is available as soon as the listener is bound.
Panics if chunk_size == 0.
Sourcepub fn bind_default<A>(
addr: A,
) -> Source<TcpIncomingConnection, StreamCompletion<TcpBinding>>
pub fn bind_default<A>( addr: A, ) -> Source<TcpIncomingConnection, StreamCompletion<TcpBinding>>
TokioTcp::bind with the default 8 KiB chunk size.