BackCon

Trait BackCon 

Source
pub trait BackCon:
    'static
    + Send
    + Sync {
    // Required methods
    fn send(&self, data: Vec<u8>) -> BoxFuture<'_, Result<()>>;
    fn pub_key(&self) -> &PubKey;
    fn is_using_webrtc(&self) -> bool;
    fn get_stats(&self) -> ConnStats;
}
Expand description

Backend connection.

Required Methods§

Source

fn send(&self, data: Vec<u8>) -> BoxFuture<'_, Result<()>>

Send data over this backend connection.

Source

fn pub_key(&self) -> &PubKey

Get the pub_key identifying this connection.

Source

fn is_using_webrtc(&self) -> bool

Returns true if we successfully connected over webrtc.

Source

fn get_stats(&self) -> ConnStats

Get connection statistics.

Implementors§