Struct ckb_sync::NetTimeProtocol
source · [−]pub struct NetTimeProtocol { /* private fields */ }Expand description
Collect time offset samples from network peers and send notify to user if offset is too large
Implementations
Trait Implementations
Init action on service run
Called when opening protocol
Called when the corresponding protocol message is received
fn disconnected(
&mut self,
_nc: Arc<dyn CKBProtocolContext + Sync + 'static>,
_peer_index: SessionId
)
fn disconnected(
&mut self,
_nc: Arc<dyn CKBProtocolContext + Sync + 'static>,
_peer_index: SessionId
)
Called when closing protocol
Called when the Service receives the notify task
Auto Trait Implementations
impl !RefUnwindSafe for NetTimeProtocol
impl Send for NetTimeProtocol
impl Sync for NetTimeProtocol
impl Unpin for NetTimeProtocol
impl UnwindSafe for NetTimeProtocol
Blanket Implementations
Mutably borrows from an owned value. Read more