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
optionsQuicClientConnectOptionsThe server's endpoint, the name it is reached by and the certificate check.
cancellationTokenCancellationTokenThe 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
cancellationTokenwas canceled.- IOException
The connection failed: the server could not be reached, refused it, or the certificate was rejected.