Exemplo n.º 1
0
        //---------------------------------------------------------------------
        static async Task RunGatewayAsync()
        {
            EbLog.NoteCallback = Console.WriteLine;
            EbLog.WarningCallback = Console.WriteLine;
            EbLog.ErrorCallback = Console.WriteLine;

            IPAddress host = IPAddress.Parse("192.168.0.10");
            int port = 5882;

            Gateway gateway = new Gateway();
            await gateway.Start(host, port, "ClientConfiguration.xml");

            Console.WriteLine("Gateway Start ManagedThreadId=" + Thread.CurrentThread.ManagedThreadId);
            Console.WriteLine("按回车键退出。。。");
            Console.ReadLine();

            await gateway.Stop();

            Console.WriteLine("Gateway Stop");
        }
Exemplo n.º 2
0
 //---------------------------------------------------------------------
 public Gateway()
 {
     Instance = this;
 }