pub trait AsEpHnd: 'static + Send + Sync + Unpin {
    fn debug(&self) -> Value;
fn uniq(&self) -> Uniq;
fn local_addr(&self) -> KitsuneResult<TxUrl>;
fn local_cert(&self) -> Tx2Cert;
fn is_closed(&self) -> bool;
fn close(&self, code: u32, reason: &str) -> BoxFuture<'static, ()>;
fn close_connection(
        &self,
        remote: TxUrl,
        code: u32,
        reason: &str
    ) -> BoxFuture<'static, ()>;
fn get_connection(
        &self,
        remote: TxUrl,
        timeout: KitsuneTimeout
    ) -> BoxFuture<'static, KitsuneResult<ConHnd>>; fn write(
        &self,
        remote: TxUrl,
        msg_id: MsgId,
        data: PoolBuf,
        timeout: KitsuneTimeout
    ) -> BoxFuture<'static, KitsuneResult<()>> { ... } }
Expand description

Trait representing a connection handle.

Required methods

Capture a debugging internal state dump.

Get the opaque Uniq identifier for this endpoint.

Get the bound local address of this endpoint.

Get the local certificate digest.

Is this endpoint closed?

Close this endpoint.

Force close a specific connection.

Get a connection handle to an existing connection. If one does not exist, establish a new connection.

Provided methods

Write data to target remote.

Implementors