Interface IRpcClient
Interface representing rpc communication
public interface IRpcClient : IDisposable
- Inherited Members
- Extension Methods
Properties
Endpoint
Details of the RPC service endpoint
EndpointInfo Endpoint { get; init; }
Property Value
- EndpointInfo
- Interface representing rpc communication
Methods
PostMessage(Message, CancellationToken)
Task PostMessage(Message message, CancellationToken cancellationToken = default)
Parameters
message
MessageThe message to post
cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
Remarks
Awaiting this method waits for the message to be sent only. It doesn't await a response.
SendMessage(Message, CancellationToken)
Task<dynamic> SendMessage(Message message, CancellationToken cancellationToken = default)
Parameters
message
MessageThe message to send
cancellationToken
CancellationTokenA token to allow the call to be cancelled
Returns
- Task<dynamic>
The response message
Remarks
Awaiting this method will block until a response is received from the Endpoint or the A token to allow the call to be cancelled is cancelled
Exceptions
- ResponseException
Throws when IsSuccessfulResponse is False