port = 9999;
ip = "222.73.40.208";
IPAddress ipaddress = IPAddress.Parse(ip);
IPEndPoint address = new IPEndPoint(ipaddress, port);
IPEndPoint ep = new IPEndPoint(0, 6565);
client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
//LocalEP.Port = 6666; client.Bind(ep);
client.Connect(address);
string sendstr = "CONN";
byte[] bs = Encoding.ASCII.GetBytes(sendstr);
client.Send(bs, bs.Length, 0); 这样写有什么问题呢。为什么服务端看到还是随机IP
ip = "222.73.40.208";
IPAddress ipaddress = IPAddress.Parse(ip);
IPEndPoint address = new IPEndPoint(ipaddress, port);
IPEndPoint ep = new IPEndPoint(0, 6565);
client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
//LocalEP.Port = 6666; client.Bind(ep);
client.Connect(address);
string sendstr = "CONN";
byte[] bs = Encoding.ASCII.GetBytes(sendstr);
client.Send(bs, bs.Length, 0); 这样写有什么问题呢。为什么服务端看到还是随机IP
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货