Skip to main content

StreamHandler

Trait StreamHandler 

Source
pub(crate) trait StreamHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn halfstream_expiry(&self, hop: &CircHopOutbound) -> Duration;
}
Expand description

Trait for customizing the behavior of the stream reactor.

Used for plugging in the implementation-dependent (client vs relay) parts of the implementation into the generic one.

Required Methods§

Source

fn halfstream_expiry(&self, hop: &CircHopOutbound) -> Duration

Return the amount of time a newly closed stream should be kept in the stream map for.

This is the amount of time we are willing to wait for an END ack before removing the half-stream from the map.

Implementors§