Struct cyfs_bdt::sn::client::PingClients
source · pub struct PingClients(_);Implementations§
source§impl PingClients
impl PingClients
pub fn net_listener(&self) -> &NetListener
sourcepub fn default_local(&self) -> Device
pub fn default_local(&self) -> Device
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 default_client(&self) -> Option<PingClient>
pub fn status(&self) -> Option<SnStatus>
pub async fn wait_online(&self) -> BuckyResult<SnStatus>
pub async fn wait_offline(&self) -> BuckyResult<()>
pub fn stop(&self)
pub fn sn_list(&self) -> &Vec<Device> ⓘ
pub fn on_time_escape(&self, now: Timestamp)
pub fn on_udp_ping_resp( &self, resp: &SnPingResp, from: &Endpoint, interface: Interface )
pub fn on_called( &self, called: &SnCalled, in_box: &PackageBox, from: &Endpoint, from_interface: Interface )
Trait Implementations§
source§impl Clone for PingClients
impl Clone for PingClients
source§fn clone(&self) -> PingClients
fn clone(&self) -> PingClients
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