pub struct PingProtocol {
peer: PeerConn,
ping_interval: u64,
ping_timeout: u64,
task_group: TaskGroup,
}Fields§
§peer: PeerConn§ping_interval: u64§ping_timeout: u64§task_group: TaskGroupImplementations§
Trait Implementations§
Source§impl Protocol for PingProtocol
impl Protocol for PingProtocol
Source§fn start<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
fn start<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
Drive the protocol to completion. Use
self.peer.recv() etc.Source§fn id() -> ProtocolID
fn id() -> ProtocolID
Returns the unique ProtocolID associated with the protocol.
Source§fn flags() -> ProtocolFlags
fn flags() -> ProtocolFlags
How this protocol takes part in handshake and discovery.
Defaults to
PREFERRED – override with REQUIRED for
protocols needed for any meaningful interaction (e.g. PING).Auto Trait Implementations§
impl !RefUnwindSafe for PingProtocol
impl !UnwindSafe for PingProtocol
impl Freeze for PingProtocol
impl Send for PingProtocol
impl Sync for PingProtocol
impl Unpin for PingProtocol
impl UnsafeUnpin for PingProtocol
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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