internal MsQuicListener(QuicListenerOptions options) { _session = new MsQuicSession(); _acceptConnectionQueue = Channel.CreateBounded <MsQuicConnection>(new BoundedChannelOptions(options.ListenBacklog) { SingleReader = true, SingleWriter = true }); _sslOptions = options.ServerAuthenticationOptions; _listenEndPoint = options.ListenEndPoint; _ptr = _session.ListenerOpen(options); }
// constructor for outbound connections public MsQuicConnection(QuicClientConnectionOptions options) { if (NetEventSource.IsEnabled) { NetEventSource.Enter(this); } // TODO need to figure out if/how we want to expose sessions // Creating a session per connection isn't ideal. _session = new MsQuicSession(); _ptr = _session.ConnectionOpen(options); _remoteEndPoint = options.RemoteEndPoint; SetCallbackHandler(); SetIdleTimeout(options.IdleTimeout); if (NetEventSource.IsEnabled) { NetEventSource.Exit(this); } }