Пример #1
0
        static void Main(string[] args)
        {
            ServerListener serverListener = new ServerListener();

            serverListener.Start();

            Console.ReadLine();
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            string cerFile = Directory.GetCurrentDirectory() + "\\certificate.cer";
            string pfxFile = Directory.GetCurrentDirectory() + "\\certificate.pfx";

            if (!File.Exists(cerFile) && !File.Exists(pfxFile))
            {
                CreateCertificate("127.0.0.1");
            }

            server = new ServerListener(Directory.GetCurrentDirectory() + "\\certificate.pfx", "127.0.0.1", 25545);
            server.Start();

            Console.ReadKey();
        }