pub trait TransportSenderT: MaybeSend + 'static {
    type Error: Error + Send + Sync;

    fn send<'life0, 'async_trait>(
        &'life0 mut self,
        msg: String
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn send_ping<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait,
        'life0: 'async_trait
, { ... } fn close<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait,
        'life0: 'async_trait
, { ... } }
Expand description

Transport interface to send data asynchronous.

Required Associated Types§

Error that may occur during sending a message.

Required Methods§

Send.

Provided Methods§

This is optional because it’s most likely relevant for WebSocket transports only. You should only implement this is your transport supports sending periodic pings.

Send ping frame (opcode of 0x9).

This is optional because it’s most likely relevant for WebSocket transports only. You should only implement this is your transport supports being closed.

Send customized close message.

Implementors§