Interface IOutputChannel
Defines the interface that a channel must implement to send a message.
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IOutputChannel
  Methods
| Improve this Doc View SourceSendMessageAsync<TResponse>(IMessage, MessageReader<TResponse>, CancellationToken)
Sends a request message.
Declaration
Task<TResponse> SendMessageAsync<TResponse>(IMessage message, MessageReader<TResponse> responseReader, CancellationToken token = default(CancellationToken))
  Parameters
| Type | Name | Description | 
|---|---|---|
| IMessage | message | The message to be sent.  | 
      
| MessageReader<TResponse> | responseReader | The response reader.  | 
      
| CancellationToken | token | The token that can be used to cancel asynchronous operation.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<TResponse> | The message representing response; or null if request message in one-way.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TResponse | The type of the parsed response message.  | 
      
Remarks
The message content may be available inside of responseReader only.
Do not try to return IMessage itself from the delegate.
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | Attempts to send message to local or unavailable endpoint.  | 
      
SendSignalAsync(IMessage, CancellationToken)
Sends one-way message.
Declaration
Task SendSignalAsync(IMessage message, CancellationToken token = default(CancellationToken))
  Parameters
| Type | Name | Description | 
|---|---|---|
| IMessage | message | The message to be sent.  | 
      
| CancellationToken | token | The token that can be used to cancel asynchronous operation.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | The task representing execution of this method.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | Attempts to send message to local or unavailable endpoint.  |