Table of Contents

Interface IMessageClient

Namespace
VpnHood.Core.Client.VpnServices.Abstractions.Messaging
Assembly
VpnHood.Core.Client.VpnServices.Abstractions.dll

Defines the app's side of the channel to the VPN service: it sends a request and gets the answer.

public interface IMessageClient : IDisposable
Inherited Members

Methods

SendAsync(Memory<byte>, CancellationToken)

Sends a request and returns the answer.

Task<Memory<byte>> SendAsync(Memory<byte> request, CancellationToken cancellationToken)

Parameters

request Memory<byte>

The request's bytes.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<Memory<byte>>

A task whose result is the answer's bytes.

Remarks

The transport owns making the connection, keeping it for reuse, and connecting again.