Trait PingSession
Source pub trait PingSession:
Send
+ Sync
+ Display {
// Required methods
fn sn(&self) -> &DeviceId;
fn local(&self) -> Endpoint;
fn reset(
&self,
local_device: Option<Device>,
sn_endpoint: Option<Endpoint>,
) -> Box<dyn PingSession>;
fn clone_as_ping_session(&self) -> Box<dyn PingSession>;
fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BuckyResult<PingSessionResp>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop(&self);
// Provided methods
fn on_time_escape(&self, _now: Timestamp) { ... }
fn on_udp_ping_resp(
&self,
_resp: &SnPingResp,
_from: &Endpoint,
) -> BuckyResult<()> { ... }
}