Esempio n. 1
0
        static void Main(string[] args)
        {
            if (args.Length < 3)
            {
                Usage();
                return;
            }

            System.Net.IPHostEntry iphe = System.Net.Dns.GetHostEntry(args[1]);

            BridgeAcceptor b = new BridgeAcceptor(
                int.Parse(args[0]),
                new System.Net.IPEndPoint(iphe.AddressList[0], int.Parse(args[2]))
                );

            b.TDSMessageReceived     += new TDSMessageReceivedDelegate(b_TDSMessageReceived);
            b.TDSPacketReceived      += new TDSPacketReceivedDelegate(b_TDSPacketReceived);
            b.ConnectionAccepted     += new ConnectionAcceptedDelegate(b_ConnectionAccepted);
            b.ConnectionDisconnected += new ConnectionDisconnectedDelegate(b_ConnectionClosed);

            b.Start();

            Console.WriteLine("Press enter to kill this process...");
            Console.ReadLine();

            b.Stop();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            args = new string[] { "7777", "techlauncher.icognition.cloud", "1433" };

            System.Net.IPHostEntry iphe = System.Net.Dns.GetHostEntry(args[1]);

            BridgeAcceptor b = new BridgeAcceptor(
                int.Parse(args[0]),
                new System.Net.IPEndPoint(iphe.AddressList[0], int.Parse(args[2]))
                );

            b.TDSMessageReceived     += new TDSMessageReceivedDelegate(b_TDSMessageReceived);
            b.TDSPacketReceived      += new TDSPacketReceivedDelegate(b_TDSPacketReceived);
            b.ConnectionAccepted     += new ConnectionAcceptedDelegate(b_ConnectionAccepted);
            b.ConnectionDisconnected += new ConnectionDisconnectedDelegate(b_ConnectionClosed);

            b.Start();

            Console.WriteLine("Press enter to kill this process...");
            Console.ReadLine();

            b.Stop();
        }