Пример #1
0
        public SecureHost(SecureHostConfig hostConfig)
        {
            HostConfig = hostConfig.Clone();

            log = new SIEM(hostConfig.AuthenticationType == EAuthType.Windows ?
                           SOURCE_NAME_WIN : SOURCE_NAME_CERT);
        }
Пример #2
0
        static void Main(string[] args)
        {
            SecureHostConfig winConfig = new SecureHostConfig()
            {
                AuthenticationType = WCFCommons.EAuthType.Windows,
                Ip   = "0.0.0.0",
                Port = 12354
            };

            SecureHostConfig certConfig = new SecureHostConfig()
            {
                AuthenticationType = WCFCommons.EAuthType.Cert,
                Ip   = "0.0.0.0",
                Port = 12355
            };

            SecureHost winHost  = new SecureHost(winConfig);
            SecureHost certHost = new SecureHost(certConfig);

            Console.WriteLine("Opening secure host...");
            winHost.Open();
            certHost.Open();

            Console.WriteLine("Host opened. Press key to close");
            Console.Read();

            Console.WriteLine("Closing...");
            winHost.Close();
            certHost.Close();
        }
Пример #3
0
        public SecureHostConfig Clone()
        {
            SecureHostConfig cloned = new SecureHostConfig
            {
                AuthenticationType = this.AuthenticationType,
                Ip   = this.Ip.Clone().ToString(),
                Port = this.Port
            };

            return(cloned);
        }