pub trait AsConHnd: Debug + 'static + Send + Sync + Unpin {
    fn uniq(&self) -> Uniq;
    fn dir(&self) -> Tx2ConDir;
    fn peer_addr(&self) -> Result<TxUrl, KitsuneError>;
    fn peer_cert(&self) -> Tx2Cert;
    fn is_closed(&self) -> bool;
    fn close(
        &self,
        code: u32,
        reason: &str
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'static, Global>>; fn write(
        &self,
        msg_id: MsgId,
        data: PoolBuf,
        timeout: KitsuneTimeout
    ) -> Pin<Box<dyn Future<Output = Result<(), KitsuneError>> + Send + 'static, Global>>; }
Expand description

Trait representing a connection handle.

Required Methods§

Get the opaque Uniq identifier for this connection.

Get the directionality of this connection.

Get the remote address of this connection.

Get the certificate digest of the remote peer.

Is this connection closed?

Close this connection.

Write data to this connection.

Implementors§