Пример #1
0
        public static void useTest()
        {
            MySocket my = new MySocket();
            string   host;
            int      port = 80;

            Console.WriteLine("Hello World!");
            host = Console.ReadLine();
            if (host.Length == 0)
            {
                host = Dns.GetHostName();
            }
            string result = my.SocketSendReceive(host, port);

            Console.WriteLine(result);
            Console.ReadLine();
        }
Пример #2
0
 public static void useTest()
 {
     MySocket my = new MySocket();
     string host;
     int port = 80;
     Console.WriteLine("Hello World!");
     host = Console.ReadLine();
     if (host.Length == 0) host = Dns.GetHostName();
     string result = my.SocketSendReceive(host, port);
     Console.WriteLine(result);
     Console.ReadLine();
 }