コード例 #1
0
ファイル: UdpTest.cs プロジェクト: ykwd/rDSN
        public static void Test(string[] args)
        {
            // client
            if (args.Length == 2)
            {
                var c = new UdpClient();
                c.Start(args[0], int.Parse(args[1]));
            }

            // server
            else if (args.Length == 1)
            {
                var c = new UdpServer();
                c.Start(int.Parse(args[0]));
            }

            else
            {
                Console.WriteLine("incorrect parameters.");
            }
        }
コード例 #2
0
ファイル: UdpTest.cs プロジェクト: ykwd/rDSN
        public static void Test(string[] args)
        {
            // client
            if (args.Length == 2)
            {
                var c = new UdpClient();
                c.Start(args[0], int.Parse(args[1]));
            }

            // server
            else if (args.Length == 1)
            {
                var c = new UdpServer();
                c.Start(int.Parse(args[0]));
            }

            else
            {
                Console.WriteLine("incorrect parameters.");
            }
        }