SOCKET通信的时候,我有个外网的电脑,但通信的时候连的是内网IP(内网服务器),传输速度超快。当我用内网电脑给内网通信的时候内网IP(内网服务器)16,17秒发一条,大家谁知道是什么原因,防火墙全关了
Socket s = new Socket("内网IP", 5050);
OutputStream os = s.getOutputStream();
PrintWriter out = new PrintWriter(os);
out.println(str);
out.flush();
                           out.close();
os.close();
s.close();

上述代码如果放在外网电脑,传给内网IP速度非常快
如果放在内网电脑,传给内网IP  传输的速度很慢16,17秒发一条,请大家帮忙看看是什么原因
谢谢大家啊