pub(crate) trait StreamHandler:
Send
+ Sync
+ 'static {
// Required methods
fn halfstream_expiry(&self, hop: &CircHopOutbound) -> Duration;
fn flowctrl_sidechannel_mitigations(&self) -> WithSidechannelMitigations;
}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§
Sourcefn halfstream_expiry(&self, hop: &CircHopOutbound) -> Duration
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.
Sourcefn flowctrl_sidechannel_mitigations(&self) -> WithSidechannelMitigations
fn flowctrl_sidechannel_mitigations(&self) -> WithSidechannelMitigations
Whether sidechannel mitigations should be enabled for incoming streams.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".