Interface IRpcClient
IRpcClient is the interface for an RPC client. See also IRpcServer and IRpcClientBuilder
public interface IRpcClient : ILifeCycle, IDisposable
- Inherited Members
Methods
PublishAsync(IMessage, CancellationToken)
PublishAsync sends a request message to the server and blocks the thread until the response is received. The PublishAsync is thread-safe and can be called from multiple threads. The Function returns the response message. If the server does not respond within the timeout, the function throws a TimeoutException.
Task<IMessage> PublishAsync(IMessage message, CancellationToken cancellationToken = default)
Parameters
message
IMessageThe request message
cancellationToken
CancellationTokenCancellation token