string sendMsg = "Hello Echo Server";
byte [] sendBytes = Encoding.ASCII.GetBytes(sendMsg);
udpClient.Send(sendBytes, sendBytes.Length, "127.0.0.1", 7);
IPEndPoint endPoint = new IPEndPoint(0,0);
byte [] rcvBytes = udpClient.Receive(ref endPoint);
string rcvMessage = Encoding.ASCII.GetString(rcvBytes, 0, rcvBytes.Length);
报错说:"远程主机强迫关闭一个连接."
用tcp协议时说"目标机器积极拒绝,连接不成功..."
我用的是win2003,问题出在哪?
byte [] sendBytes = Encoding.ASCII.GetBytes(sendMsg);
udpClient.Send(sendBytes, sendBytes.Length, "127.0.0.1", 7);
IPEndPoint endPoint = new IPEndPoint(0,0);
byte [] rcvBytes = udpClient.Receive(ref endPoint);
string rcvMessage = Encoding.ASCII.GetString(rcvBytes, 0, rcvBytes.Length);
报错说:"远程主机强迫关闭一个连接."
用tcp协议时说"目标机器积极拒绝,连接不成功..."
我用的是win2003,问题出在哪?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货