Trait kitsune_p2p_types::tx2::tx2_adapter::ConAdapt
source · [−]pub trait ConAdapt: 'static + Send + Sync + Unpin {
fn uniq(&self) -> Uniq;
fn dir(&self) -> Tx2ConDir;
fn peer_addr(&self) -> KitsuneResult<TxUrl>;
fn peer_cert(&self) -> Tx2Cert;
fn out_chan(&self, timeout: KitsuneTimeout) -> OutChanFut;
fn is_closed(&self) -> bool;
fn close(&self, code: u32, reason: &str) -> BoxFuture<'static, ()>;
}
Expand description
Tx backend adapter represents an open connection to a remote.
Required methods
fn peer_addr(&self) -> KitsuneResult<TxUrl>
fn peer_addr(&self) -> KitsuneResult<TxUrl>
Get the string address (url) of the remote.
fn out_chan(&self, timeout: KitsuneTimeout) -> OutChanFut
fn out_chan(&self, timeout: KitsuneTimeout) -> OutChanFut
Create a new outgoing channel to the remote.