Table of Contents

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 IMessage

The pong message.

StartPingAsync(CancellationToken)

Starts the ping service.

Task StartPingAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The 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

EventHandler<Exception>

PingMessageReadyEvent

Event that is raised when a ping message is ready to be sent.

event EventHandler<IMessage>? PingMessageReadyEvent

Event Type

EventHandler<IMessage>