嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 1 元微信扫码支付:1 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
网络编程技术与实践
包括UDP ,TCP/IP 多种通讯方式,以及与界面数据的异步交互
public static void Main()
{
IPAddress newaddress = IPAddress.Parse("192.168.1.1");
//创建IPEndPoint实例
IPEndPoint ex = new IPEndPoint(newaddress, 8000);
Console.WriteLine("The IPEndPoint is:{0}", ex.ToString());
Console.WriteLine("The AddressFamily is:{0}", ex.AddressFamily);
Console.WriteLine("The Address is:{0},and the port is:{1}", ex.Address, ex.Port);
Console.WriteLine("The Min Port Number is:{0}", IPEndPoint.MinPort);
Console.WriteLine("The Max Port Number is:{0}", IPEndPoint.MaxPort);
//用port属性单独改变IPEndPoint对象的端口值
ex.Port = 80;
Console.WriteLine("The changed IPEndPoint vaule is:{0}", ex.ToString());
//存储IPEdnPoint实例
SocketAddress sa = ex.Serialize();
Console.WriteLine("The Socketaddress is:{0}", sa.ToString());
Console.ReadLine();
}
}