就是从服务端接收数据,客户端向服务度发送数据,然后服务端返回一条语句可以正常接收;
- datas = new String(datas.getBytes("GB2312"),"8859_1");
- dos.writeBytes(datas);
- byte[] buf = new byte[512];
- InputStream inputStream = socket.getInputStream();
- int ret = inputStream.read(buf);
- strRecvData = new String(buf, "GB2312").trim();
复制代码
然后就接收不了 |