public QuicServerConnection( QuicConnection clientConnection, QuicServerTransport quicServerTransport, IPEndPoint lspHookedLocalEP, bool isLspHooked) { if (clientConnection == null) { throw new ArgumentNullException(nameof(clientConnection)); } if (quicServerTransport == null) { throw new ArgumentNullException(nameof(quicServerTransport)); } if (!clientConnection.Connected) { throw new ArgumentException($"Client has already disconnected"); } this.server = quicServerTransport; this.connection = clientConnection; this.stream = clientConnection.OpenBidirectionalStream(); this.thread = new ThreadManager(QuicServerConnectionReceiveLoop, Unblock); this.buffer = new BytesBuffer(); this.localEndPoint = clientConnection.LocalEndPoint as IPEndPoint; this.remoteEndPoint = clientConnection.RemoteEndPoint as IPEndPoint; }
public QuicServerListener(QuicListener quicListener, QuicServerTransport quicServerTransport, bool isLspHooked) { if (quicListener == null) { throw new ArgumentNullException(nameof(quicListener)); } if (quicServerTransport == null) { throw new ArgumentNullException(nameof(quicServerTransport)); } this.lspHooked = isLspHooked; this.listener = quicListener; this.server = quicServerTransport; this.thread = new ThreadManager(AcceptLoop, Unblock); }