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
Methods
SendMessageAsync(IMessage, CancellationToken)
Sends a message.
Task SendMessageAsync(IMessage message, CancellationToken cancellationToken = default)
Parameters
message
IMessageThe message to send.
cancellationToken
CancellationTokenThe 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