33 ConnectionOptions.IdleTimeout =
options.IdleTimeout;
34 ConnectionOptions.MaxBidirectionalStreams =
options.MaxBidirectionalStreams;
35 ConnectionOptions.MaxUnidirectionalStreams =
options.MaxUnidirectionalStreams;
37 if (
options.ServerAuthenticationOptions !=
null)
39 AuthenticationOptions.ClientCertificateRequired =
options.ServerAuthenticationOptions.ClientCertificateRequired;
40 AuthenticationOptions.CertificateRevocationCheckMode =
options.ServerAuthenticationOptions.CertificateRevocationCheckMode;
41 AuthenticationOptions.RemoteCertificateValidationCallback =
options.ServerAuthenticationOptions.RemoteCertificateValidationCallback;
42 AuthenticationOptions.ServerCertificateSelectionCallback =
options.ServerAuthenticationOptions.ServerCertificateSelectionCallback;
43 AuthenticationOptions.ApplicationProtocols =
options.ServerAuthenticationOptions.ApplicationProtocols;
44 if (
options.ServerAuthenticationOptions.ServerCertificate ==
null &&
options.ServerAuthenticationOptions.ServerCertificateContext ==
null &&
options.ServerAuthenticationOptions.ServerCertificateSelectionCallback !=
null)
76 if (
options.ListenEndPoint ==
null)
212 System.
Net.
NetEventSource.
Error(
state,
$"[Listener#{state.GetHashCode()}] Exception occurred during creating configuration in connection callback: {ex}",
"NativeCallbackHandler");
237 System.
Net.
NetEventSource.
Error(
state,
$"[Listener#{state.GetHashCode()}] Exception occurred during handling {evt.Type} connection callback: {ex2}",
"NativeCallbackHandler");
static void SuppressFinalize(object obj)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static unsafe IPEndPoint INetToIPEndPoint(ref MsQuicNativeMethods.SOCKADDR_INET inetAddress)
static unsafe MsQuicNativeMethods.SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
static unsafe void Prepare(List< SslApplicationProtocol > alpnProtocols, [NotNull] out MemoryHandle[] handles, [NotNull] out MsQuicNativeMethods.QuicBuffer[] buffers)
static void Return(ref MemoryHandle[] handles, ref MsQuicNativeMethods.QuicBuffer[] buffers)
static unsafe MsQuicNativeMethods.SOCKADDR_INET GetINetParam(MsQuicApi api, SafeHandle nativeObject, QUIC_PARAM_LEVEL level, uint param)
static bool SuccessfulStatusCode(uint status)
static string GetTraceId(SafeMsQuicStreamHandle handle)
static void ThrowIfFailed(uint status, string message=null, Exception innerException=null)
static SafeMsQuicConfigurationHandle Create(QuicClientConnectionOptions options)
State(QuicListenerOptions options)
QuicOptions ConnectionOptions
readonly ConcurrentDictionary< IntPtr, MsQuicConnection > PendingConnections
SafeMsQuicListenerHandle Handle
readonly SafeMsQuicConfigurationHandle ConnectionConfiguration
SslServerAuthenticationOptions AuthenticationOptions
readonly Channel< MsQuicConnection > AcceptConnectionQueue
static readonly MsQuicNativeMethods.ListenerCallbackDelegate s_listenerDelegate
void Dispose(bool disposing)
readonly IPEndPoint _listenEndPoint
unsafe IPEndPoint Start(QuicListenerOptions options)
override async ValueTask< QuicConnectionProvider > AcceptConnectionAsync(CancellationToken cancellationToken=default(CancellationToken))
static unsafe uint NativeCallbackHandler(IntPtr listener, IntPtr context, ref MsQuicNativeMethods.ListenerEvent evt)
override IPEndPoint ListenEndPoint
MsQuicListener(QuicListenerOptions options)
static unsafe? string PtrToStringAnsi(IntPtr ptr)
static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
static readonly IntPtr Zero
static IntPtr ToIntPtr(GCHandle value)
static GCHandle Alloc(object? value)
static GCHandle FromIntPtr(IntPtr value)