| | |
| | | // TODO: 2019/12/4 |
| | | //服务端返回消息后 |
| | | ByteBuf buf = (ByteBuf) msg; |
| | | byte[] req = new byte[buf.readableBytes()]; |
| | | buf.readBytes(req); |
| | | Log.i(TAG, "channelRead hex str: "+ ByteUtil.byte2HexStr(req)); |
| | | String str = new String(req, "UTF-8"); |
| | | if (req!=null && req.length>0) |
| | | imsClient.getMsgDispatcher().receivedMsg( req ); |
| | | int len = buf.readableBytes(); |
| | | if (len>0){ |
| | | byte[] req = new byte[len+2]; |
| | | buf.readBytes(req,1,len); |
| | | req[0] = 0x7E; |
| | | req[len+1] = 0x7e; |
| | | Log.i(TAG, "channelRead hex str: "+ ByteUtil.byte2HexStr(req)); |
| | | // if (req!=null && req.length>0){ |
| | | // |
| | | // imsClient.getMsgDispatcher().receivedMsg( req ); |
| | | // } |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |