Beispiel #1
0
        private static void RunBroker(string[] args)
        {
            //BROKER PORT

            int port = Convert.ToInt32(args[1]);

            var broker = new MessageBroker(IPAddress.Any, port);
            broker.Start();

            Console.WriteLine("Service started, Enter to exit");
            Console.ReadLine();

            broker.Stop();
        }
Beispiel #2
0
        private static void RunRouteBroker(string[] args)
        {
            //ROUTE PORT CONN_IP CONN_PORT

            int port = Convert.ToInt32(args[1]);
            string conn_ip = args[2];
            int conn_port = Convert.ToInt32(args[3]);

            var broker = new MessageBroker(IPAddress.Any, port);
            broker.Start();
            broker.Connect(conn_ip, conn_port);

            Console.WriteLine("Route Service started, Enter to exit");
            Console.ReadLine();

            broker.Stop();
        }