Skip to main content

HandshakeStream

Type Alias HandshakeStream 

Source
pub type HandshakeStream<S = TcpStream> = ObservedStream<S, HandshakeClock>;
Expand description

An accepted controller-listener connection, handed to RaftListenerHandshake::upgrade.

Every read or write that moves bytes restarts the listener’s idle window, as Kafka’s Selector refreshes a channel’s idle clock on every ready key. The window closes a handshake that goes silent, not one that is slow. Once the listener takes the upgraded stream for its request loop, the clock is disarmed and the stream only passes bytes through.

Aliased Type§

pub struct HandshakeStream<S = TcpStream> { /* private fields */ }

Trait Implementations§

Source§

impl<S> From<S> for HandshakeStream<S>

A stream no idle window watches, for a listener without connections.max.idle.ms and for tests that drive a handshake directly.

Source§

fn from(inner: S) -> Self

Converts to this type from the input type.