TransportLayerInsecurity.Server.Server C# (CSharp) Method

Server() public method

public Server ( ServerConfiguration configuration, IServerEventHandler serverEventHandler ) : System
configuration ServerConfiguration
serverEventHandler IServerEventHandler
return System
        public Server(ServerConfiguration configuration, IServerEventHandler serverEventHandler)
        {
            LocalEndpoint = GetEndpoint(configuration.LocalHost, configuration.LocalPort);
            RemoteEndpoint = GetEndpoint(configuration.RemoteHost, configuration.RemotePort);

            ServerCertificate = new X509Certificate(configuration.CertificatePath, "");

            TargetHost = configuration.TargetHost;

            Listener = new TcpListener(LocalEndpoint);

            ServerThread = new Thread(RunThread);
            ServerThread.Name = "TransportLayerInsecurity Server";

            Running = false;

            ServerEventHandler = serverEventHandler;
        }