Interface IPingPongService
- Namespace
- NLightning.Domain.Protocol.Services
- Assembly
- NLightning.Domain.dll
Interface for a ping pong service.
public interface IPingPongService
Methods
HandlePong(IMessage)
Handles a pong message.
void HandlePong(IMessage message)
Parameters
message
IMessageThe 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<Exception>? DisconnectEvent
Event Type
PingMessageReadyEvent
Event that is raised when a ping message is ready to be sent.
event EventHandler<IMessage>? PingMessageReadyEvent