StringBuffer sb = new StringBuffer();
s = new Socket(ipAddress, post);
dos = new DataOutputStream(s.getOutputStream());
dos.write(b1);
dis = new DataInputStream(s.getInputStream());
dis.read(b2);
上面这段程序是向服务器发送数据包并同时获得服务器响应,不知为何速度明显很慢(和别人写的JAR对比),后来调试到了dis.read(b2);这步发现很慢,谁能告诉我这个问题怎么解决呢
s = new Socket(ipAddress, post);
dos = new DataOutputStream(s.getOutputStream());
dos.write(b1);
dis = new DataInputStream(s.getInputStream());
dis.read(b2);
上面这段程序是向服务器发送数据包并同时获得服务器响应,不知为何速度明显很慢(和别人写的JAR对比),后来调试到了dis.read(b2);这步发现很慢,谁能告诉我这个问题怎么解决呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货