Table of Contents

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 PongMessage

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? DisconnectEvent

Event Type

EventHandler

PingMessageReadyEvent

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

event EventHandler<PingMessage>? PingMessageReadyEvent

Event Type

EventHandler<PingMessage>