pub struct SbdClientCrypto { /* private fields */ }Expand description
An encrypted connection to peers through an Sbd server.
Implementations§
Source§impl SbdClientCrypto
impl SbdClientCrypto
Sourcepub async fn new(url: &str, config: Arc<Config>) -> Result<(Self, MsgRecv)>
pub async fn new(url: &str, config: Arc<Config>) -> Result<(Self, MsgRecv)>
Establish a new connection.
Sourcepub fn active_peers(&self) -> Vec<PubKey>
pub fn active_peers(&self) -> Vec<PubKey>
Get the current active “connected” peers.
Sourcepub async fn assert(&self, pk: &PubKey) -> Result<()>
pub async fn assert(&self, pk: &PubKey) -> Result<()>
Assert that we are connected to a peer without sending any data.
Sourcepub async fn close_peer(&self, pk: &PubKey)
pub async fn close_peer(&self, pk: &PubKey)
Close a connection to a specific peer.
Auto Trait Implementations§
impl Freeze for SbdClientCrypto
impl !RefUnwindSafe for SbdClientCrypto
impl Send for SbdClientCrypto
impl Sync for SbdClientCrypto
impl Unpin for SbdClientCrypto
impl !UnwindSafe for SbdClientCrypto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more