ln.http/connections/HttpsConnection.cs

48 lines
1.3 KiB
C#

// /**
// * File: HttpsConnection.cs
// * Author: haraldwolff
// *
// * This file and it's content is copyrighted by the Author and / or copyright holder.
// * Any use wihtout proper permission is illegal and may lead to legal actions.
// *
// *
// **/
using System;
using System.IO;
using System.Security.AccessControl;
using ln.types;
using System.Net.Security;
using ln.http.listener;
using ln.types.net;
namespace ln.http.connections
{
public class HttpsConnection : Connection
{
Connection Connection { get; }
SslStream sslStream { get; }
public override IPv6 RemoteHost => Connection.RemoteHost;
public override int RemotePort => Connection.RemotePort;
public HttpsConnection(Listener listener,Connection connection,LocalCertificateSelectionCallback localCertificateSelectionCallback)
:base(listener)
{
Connection = connection;
sslStream = new SslStream(connection.GetStream(),false, null, localCertificateSelectionCallback);
}
public override HttpRequest ReadRequest(HTTPServer server)
{
throw new NotImplementedException();
}
public override Stream GetStream() => sslStream;
public override void Close()
{
sslStream.Close();
}
}
}