public HttpConnection(Socket sock, IHttpListenerContextBinder epl) { this.sock = sock; this.epl = epl; stream = new NetworkStream(sock, false); Init(); }
public HttpConnection (Socket sock, IHttpListenerContextBinder epl) { this.sock = sock; this.epl = epl; stream = new NetworkStream (sock, false); Init (); }
public HttpConnection (Socket sock, IHttpListenerContextBinder epl, bool secure, X509Certificate2 cert, AsymmetricAlgorithm key) { this.sock = sock; this.epl = epl; this.secure = secure; this.key = key; if (secure == false) { stream = new NetworkStream (sock, false); } else { SslServerStream ssl_stream = new SslServerStream (new NetworkStream (sock, false), cert, false, false); ssl_stream.PrivateKeyCertSelectionDelegate += OnPVKSelection; stream = ssl_stream; } Init (); }
public HttpConnection(Socket sock, IHttpListenerContextBinder epl, bool secure, X509Certificate2 cert, AsymmetricAlgorithm key) { this.sock = sock; this.epl = epl; this.secure = secure; this.key = key; if (secure == false) { stream = new NetworkStream(sock, false); } else { SslServerStream ssl_stream = new SslServerStream(new NetworkStream(sock, false), cert, false, false); ssl_stream.PrivateKeyCertSelectionDelegate += OnPVKSelection; stream = ssl_stream; } Init(); }