1 instantiation of MsQuicApi
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicApi.cs (1)
233
return new
MsQuicApi
(apiTable);
54 references to MsQuicApi
System.Net.Quic (54)
System\Net\Quic\Internal\MsQuicApi.cs (8)
54
private static readonly Lazy<
MsQuicApi
> _api = new Lazy<
MsQuicApi
>(AllocateMsQuicApi);
55
internal static
MsQuicApi
Api => _api.Value;
97
string path = typeof(
MsQuicApi
).Assembly.Location is string assemblyLocation && !string.IsNullOrEmpty(assemblyLocation)
108
loaded = NativeLibrary.TryLoad(path, typeof(
MsQuicApi
).Assembly, DllImportSearchPath.LegacyBehavior, out msQuicHandle);
113
loaded = NativeLibrary.TryLoad($"{Interop.Libraries.MsQuic}.{s_minMsQuicVersion.Major}", typeof(
MsQuicApi
).Assembly, null, out msQuicHandle) ||
114
NativeLibrary.TryLoad(Interop.Libraries.MsQuic, typeof(
MsQuicApi
).Assembly, null, out msQuicHandle);
224
private static
MsQuicApi
AllocateMsQuicApi()
System\Net\Quic\Internal\MsQuicConfiguration.cs (9)
27
if (
MsQuicApi
.UsesSChannelBackend)
187
if (!
MsQuicApi
.UsesSChannelBackend)
202
if (!
MsQuicApi
.UsesSChannelBackend && certificate is X509Certificate2 cert && intermediates is null)
215
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConfigurationOpen(
216
MsQuicApi
.Api.Registration,
238
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
240
else if (
MsQuicApi
.UsesSChannelBackend)
244
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
276
status =
MsQuicApi
.Api.ConfigurationLoadCredential(configurationHandle, &config);
System\Net\Quic\Internal\MsQuicHelpers.cs (2)
66
int status =
MsQuicApi
.Api.GetParam(
85
int status =
MsQuicApi
.Api.SetParam(
System\Net\Quic\Internal\MsQuicSafeHandle.cs (5)
49
SafeHandleType.Registration =>
MsQuicApi
.Api.ApiTable->RegistrationClose,
50
SafeHandleType.Configuration =>
MsQuicApi
.Api.ApiTable->ConfigurationClose,
51
SafeHandleType.Listener =>
MsQuicApi
.Api.ApiTable->ListenerClose,
52
SafeHandleType.Connection =>
MsQuicApi
.Api.ApiTable->ConnectionClose,
53
SafeHandleType.Stream =>
MsQuicApi
.Api.ApiTable->StreamClose,
System\Net\Quic\NetEventSource.Quic.Counters.cs (2)
215
if (!
MsQuicApi
.IsQuicSupported)
226
MsQuicApi
.Api.ApiTable->GetParam(null, QUIC_PARAM_GLOBAL_PERF_COUNTERS, &size, (byte*)pCounters);
System\Net\Quic\QuicConnection.cs (10)
53
public static bool IsSupported =>
MsQuicApi
.IsQuicSupported;
65
throw new PlatformNotSupportedException(SR.Format(SR.SystemNetQuic_PlatformNotSupported,
MsQuicApi
.NotSupportedReason ?? "General loading failure."));
322
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionOpen(
323
MsQuicApi
.Api.Registration,
357
MsQuicApi
.Api.SetCallbackHandler(
433
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionStart(
478
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ConnectionSetConfiguration(
618
MsQuicApi
.Api.ConnectionShutdown(
830
MsQuicApi
.Api.ConnectionShutdown(
840
MsQuicApi
.Api.ConnectionShutdown(
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (4)
85
if (
MsQuicApi
.UsesSChannelBackend)
118
if (
MsQuicApi
.SupportsAsyncCertValidation)
157
if (
MsQuicApi
.SupportsAsyncCertValidation)
159
int status =
MsQuicApi
.Api.ConnectionCertificateValidationComplete(
System\Net\Quic\QuicListener.cs (6)
43
public static bool IsSupported =>
MsQuicApi
.IsQuicSupported;
55
throw new PlatformNotSupportedException(SR.Format(SR.SystemNetQuic_PlatformNotSupported,
MsQuicApi
.NotSupportedReason ?? "General loading failure."));
125
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ListenerOpen(
126
MsQuicApi
.Api.Registration,
155
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.ListenerStart(
423
MsQuicApi
.Api.ListenerStop(_handle);
System\Net\Quic\QuicStream.cs (8)
172
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamOpen(
218
MsQuicApi
.Api.SetCallbackHandler(
260
int status =
MsQuicApi
.Api.StreamStart(
336
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamReceiveSetEnabled(
413
int status =
MsQuicApi
.Api.StreamSend(
481
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamShutdown(
527
ThrowHelper.ThrowIfMsQuicError(
MsQuicApi
.Api.StreamShutdown(
754
int status =
MsQuicApi
.Api.StreamShutdown(