Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Broker");

            BSocket bSocket = new BSocket();

            bSocket.Start("127.0.0.1", 9999);

            var messageWorker = new MessageWorker();

            Task.Factory.StartNew(messageWorker.SendMessages, TaskCreationOptions.LongRunning);

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Console.WriteLine("It's me Broker");

            BrokerSocket socket = new BrokerSocket();

            socket.Start(Settings.BROKER_IP, Settings.BROKER_PORT);

            var messageWorker = new MessageWorker();

            Task.Factory.StartNew(messageWorker.DoSendMessageWork, TaskCreationOptions.LongRunning);

            Console.ReadLine();
        }