tcpc.Connect(("192.168.10.66",8888);//发出连接请求;
s = tcpc.GetStream();//获取192.168.10.66的信息;
// 读取流并将其转换为 ASCII
int bytes = s.Read(read, 0, read.Length);
String Time = Encoding.ASCII.GetString(read);
//显示信息
...........
参考:
TCPClient
http://chs.gotdotnet.com/QuickStart/aspplus/default.aspx?url=%2fquickstart%2fhowto%2fdoc%2fWebRequests%2fclientGET.aspx
TCPListener
http://chs.gotdotnet.com/QuickStart/aspplus/default.aspx?url=%2fquickstart%2fhowto%2fdoc%2fWebRequests%2fclientGET.aspx
s = tcpc.GetStream();//获取192.168.10.66的信息;
// 读取流并将其转换为 ASCII
int bytes = s.Read(read, 0, read.Length);
String Time = Encoding.ASCII.GetString(read);
//显示信息
...........
参考:
TCPClient
http://chs.gotdotnet.com/QuickStart/aspplus/default.aspx?url=%2fquickstart%2fhowto%2fdoc%2fWebRequests%2fclientGET.aspx
TCPListener
http://chs.gotdotnet.com/QuickStart/aspplus/default.aspx?url=%2fquickstart%2fhowto%2fdoc%2fWebRequests%2fclientGET.aspx
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货