Struct cyfs_bdt::sn::client::ClientManager
source · pub struct ClientManager(_);Implementations§
source§impl ClientManager
impl ClientManager
pub fn create( stack: Weak<StackImpl>, net_listener: NetListener, local_device: Device ) -> Self
pub fn cache(&self) -> &SnCache
sourcepub fn ping(&self) -> PingClients
pub fn ping(&self) -> PingClients
Examples found in repository?
examples/stream.rs (line 31)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
async fn send_large_stream(
ln_stack: &StackGuard,
rn_stack: &StackGuard,
data: &[u8],
) -> BuckyResult<()> {
let param = BuildTunnelParams {
remote_const: rn_stack.local_const().clone(),
remote_sn: None,
remote_desc: Some(rn_stack.sn_client().ping().default_local()),
};
let mut stream = ln_stack
.stream_manager()
.connect(0u16, vec![], param)
.await?;
stream.write_all(data).await?;
let _ = stream.shutdown(Shutdown::Both);
Ok(())
}pub fn reset(&self) -> Option<PingClients>
pub fn reset_sn_list(&self, sn_list: Vec<Device>) -> PingClients
pub fn reset_endpoints( &self, net_listener: NetListener, local_device: Device ) -> PingClients
pub fn call(&self) -> &CallManager
Trait Implementations§
source§impl Clone for ClientManager
impl Clone for ClientManager
source§fn clone(&self) -> ClientManager
fn clone(&self) -> ClientManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more