System.Net.HttpConnection.HttpConnection C# (CSharp) Method

HttpConnection() public method

public HttpConnection ( Socket sock, EndPointListener epl, bool secure, X509Certificate2 cert, AsymmetricAlgorithm key ) : System.IO
sock Socket
epl EndPointListener
secure bool
cert System.Security.Cryptography.X509Certificates.X509Certificate2
key System.Security.Cryptography.AsymmetricAlgorithm
return System.IO
		public HttpConnection (Socket sock, EndPointListener 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 {
#if EMBEDDED_IN_1_0
				throw new NotImplementedException ();
#else
				SslServerStream ssl_stream = new SslServerStream (new NetworkStream (sock, false), cert, false, false);
				ssl_stream.PrivateKeyCertSelectionDelegate += OnPVKSelection;
				stream = ssl_stream;
#endif
			}
			Init ();
		}