Interface IPingPongService
- Namespace
- NLightning.Bolts.BOLT1.Interfaces
- Assembly
- NLightning.Bolts.dll
Interface for a ping pong service.
public interface IPingPongService
Methods
HandlePong(PongMessage)
Handles a pong message.
void HandlePong(PongMessage pongMessage)
Parameters
pongMessage
PongMessageThe pong message.
StartPingAsync(CancellationToken)
Starts the ping service.
Task StartPingAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task that represents the asynchronous operation.
Events
DisconnectEvent
Event that is raised when the pong is not received in time or the pong message is invalid.
event EventHandler? DisconnectEvent
Event Type
PingMessageReadyEvent
Event that is raised when a ping message is ready to be sent.
event EventHandler<PingMessage>? PingMessageReadyEvent