public static void Main() 
{

// 把IP地址转换为IPAddress的实例
IPAddress ipAd = IPAddress.Parse("218.30.125.147");
            
// 初始化监听器, 端口为8001
TcpListener myList=new TcpListener(ipAd,4546);
            
// 开始监听服务器端口
string str2=null;
myList.Start(); // 输出服务器启动信息
Console.WriteLine("在4546端口启动服务...");
Console.WriteLine("本地节点为:" + myList.LocalEndpoint );
Console.WriteLine("等待连接.....");
            
// 等待处理接入连接请求
// 新建立的连接用套接字s表示
Socket s=myList.AcceptSocket();
Console.WriteLine("连接来自 "+s.RemoteEndPoint);
}