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 kind() -> ProtocolKind
fn kind() -> ProtocolKind
Whether peers must speak this protocol or it’s optional.
Defaults to
Optional – override for protocols required for
any meaningful interaction (e.g. PING).Auto Trait Implementations§
impl !Freeze for PingProtocol
impl !RefUnwindSafe for PingProtocol
impl Send for PingProtocol
impl Sync for PingProtocol
impl Unpin for PingProtocol
impl UnsafeUnpin for PingProtocol
impl !UnwindSafe 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