Trait tor_proto::stream::IncomingStreamRequestFilter

source ·
pub trait IncomingStreamRequestFilter: Send + 'static {
    // Required method
    fn disposition(
        &mut self,
        ctx: &IncomingStreamRequestContext<'_>,
        circ: &ClientCircSyncView<'_>
    ) -> Result<IncomingStreamRequestDisposition>;
}
Available on crate feature hs-service only.
Expand description

A callback that can check whether a given stream request is acceptable immediately on its receipt.

This should only be used for checks that need to be done immediately, with a view of the state of the circuit. Any other checks should, if possible, be done on the IncomingStream objects as they are received.

Required Methods§

source

fn disposition( &mut self, ctx: &IncomingStreamRequestContext<'_>, circ: &ClientCircSyncView<'_> ) -> Result<IncomingStreamRequestDisposition>

Check an incoming stream request, and decide what to do with it.

Implementations of this function should

Implementors§