Table of Contents

Interface IMessageService

Namespace
NLightning.Bolts.BOLT1.Interfaces
Assembly
NLightning.Bolts.dll

Interface for a message service.

public interface IMessageService : IDisposable
Inherited Members

Remarks

This interface is used to send and receive messages.

Properties

IsConnected

Gets a value indicating whether the transport service is connected.

bool IsConnected { get; }

Property Value

bool

Methods

SendMessageAsync(IMessage, CancellationToken)

Sends a message.

Task SendMessageAsync(IMessage message, CancellationToken cancellationToken = default)

Parameters

message IMessage

The message to send.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task that represents the asynchronous operation.

Events

MessageReceived

Event that is raised when a message is received.

event EventHandler<IMessage>? MessageReceived

Event Type

EventHandler<IMessage>