Пример #1
0
        static void Main(string[] args)
        {
            RunServer();

            Console.Write(">");
            string line;

            while ((line = Console.ReadLine()) != "exit")
            {
                try
                {
                    if (line == "stop")
                    {
                        hub.StopServer();
                    }
                    else if (line == "start")
                    {
                        hub.StartServer("Meta");
                        hub.Subscribe <PingCommand>(OnPing);
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex);
                }

                Console.Write(">");
            }
        }