| | |
| | | |
| | | //反转义 |
| | | byte[] datas=messageEscaper.unescape(message); |
| | | MyLog.i(PlatFormConstant.TAG,"转义过后的服务消息:"+ BytesUtils.bytesToHexString(datas)); |
| | | MyLog.i(PlatFormConstant.TAG,"服务消息:"+ BytesUtils.bytesToHexString(datas)); |
| | | JK2019MessageBase jk2019MessageBase = MessageManager.get(BytesUtils.bytesToHexString(datas)); |
| | | if (jk2019MessageBase instanceof JKMessage8100){ |
| | | if (((JKMessage8100) jk2019MessageBase).result == JKMessage8100.SUCCESS){ |
| | |
| | | byte[] miwen =Utils.encrypt(ByteUtil.intGetBytes(unsignedInt),des); |
| | | MyLog.i(PlatFormConstant.TAG,"鉴权密文="+BytesUtils.bytesToHexString(miwen)+" time="+unsignedInt); |
| | | jkMessage0101.des = BytesUtils.bytesToHexString(miwen); |
| | | MyLog.i(PlatFormConstant.TAG,"发送鉴权消息"); |
| | | sendMessage(jkMessage0101); |
| | | ExamPlatformData.getInstance().setExamplatformStatus(ExamPlatformData.DEV_REGISTERED); |
| | | }else{ |
| | |
| | | String msgid = BytesUtils.bytesToHexString(msgidbytes); |
| | | Log.i(TAG, "run: msgid="+msgid); |
| | | if ((msgid.equalsIgnoreCase("0100")) || (msgid.equalsIgnoreCase("0101"))){ |
| | | |
| | | MyLog.i(PlatFormConstant.TAG,"注册/鉴权消息直接发送,不发送是否登录成功"); |
| | | if (IMSClientBootstrap.getInstance().isActive()){ |
| | | IMSClientBootstrap.getInstance().sendMessage(messageEscaper.escape(msg.toBytes())); |
| | | }else{ |
| | | Log.e(TAG, "run: 发送消息失败,未初始化连接NettyTcp"); |
| | | MyLog.i(PlatFormConstant.TAG, "发送消息失败,未初始化连接NettyTcp"); |
| | | } |
| | | }else{ |
| | | MyLog.i(PlatFormConstant.TAG,"登录未成功,不能发送消息="+msgid); |