Table of Contents

Interface IQuicClient

Namespace
VpnHood.Net.Quic.Abstractions
Assembly
VpnHood.Net.Quic.Abstractions.dll

Represents a QUIC client, which connects to a VpnHood server.

public interface IQuicClient

Methods

ConnectAsync(QuicClientConnectOptions, CancellationToken)

Opens a QUIC connection to a server and completes its TLS handshake.

ValueTask<IQuicConnection> ConnectAsync(QuicClientConnectOptions options, CancellationToken cancellationToken)

Parameters

options QuicClientConnectOptions

The server's endpoint, the name it is reached by and the certificate check.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

ValueTask<IQuicConnection>

A task that represents the asynchronous operation. Its result is the connection; dispose it to close it.

Exceptions

NotSupportedException

The platform does not support this client's QUIC.

OperationCanceledException

cancellationToken was canceled.

IOException

The connection failed: the server could not be reached, refused it, or the certificate was rejected.