Skip to main content

DecoyFlowSender

Trait DecoyFlowSender 

Source
pub trait DecoyFlowSender: Send + Sync {
    // Required method
    fn send_decoy_packet<'a>(
        &'a self,
        packet: DynamicByteBuffer,
        fallthrough: bool,
        is_maintenance: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), FlowControllerError>> + Send + 'a>>;
}
Expand description

Object-safe interface used by decoy providers to dispatch generated packets. Implemented explicitly by each flow manager — ClientFlowManager forwards to its FlowManager::send_packet, ServerFlowManager forwards to its inherent send_packet.

Required Methods§

Source

fn send_decoy_packet<'a>( &'a self, packet: DynamicByteBuffer, fallthrough: bool, is_maintenance: bool, ) -> Pin<Box<dyn Future<Output = Result<(), FlowControllerError>> + Send + 'a>>

Send a generated decoy packet through the flow manager. fallthrough skips the tailer step (see FlowManager::send_packet).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: IdentityType + Clone + 'static, AE: AsyncExecutor + 'static> DecoyFlowSender for ClientFlowManager<T, AE>

Source§

impl<T: IdentityType + Clone + Eq + Hash + Send + ToString + 'static, AE: AsyncExecutor + 'static> DecoyFlowSender for ServerFlowManager<T, AE>