| | |
| | | import com.easysocket.interfaces.conn.IConnectionManager; |
| | | import com.easysocket.interfaces.conn.ISocketActionDispatch; |
| | | import com.easysocket.interfaces.io.IWriter; |
| | | import com.easysocket.utils.HexUtil; |
| | | import com.easysocket.utils.LogUtil; |
| | | |
| | | import java.io.IOException; |
| | |
| | | @Override |
| | | public void write(byte[] sendBytes) throws IOException { |
| | | if (sendBytes != null) { |
| | | LogUtil.d("Socket发送数据String-->" + new String(sendBytes, Charset.forName("utf-8"))); |
| | | LogUtil.d("Socket发送数据byte[]-->" + Arrays.toString(sendBytes)); |
| | | LogUtil.d("EasyWriter--Socket发送数据String-->" + HexUtil.bytesToHex(sendBytes)); |
| | | LogUtil.d("EasyWriter--Socket发送数据byte[]-->" + Arrays.toString(sendBytes)); |
| | | int packageSize = socketOptions.getMaxWriteBytes(); // 每次可以发送的最大数据 |
| | | int remainingCount = sendBytes.length; |
| | | ByteBuffer writeBuf = ByteBuffer.allocate(packageSize); |