We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Override public void onOtherCmdMsg(HuyaCmdEnum cmd, ICmdMsg<HuyaCmdEnum> cmdMsg) { if (Objects.requireNonNull(cmd) == HuyaCmdEnum.GuardianPresenterInfoNotice) { logger.info("监听到守护"); byte[] dataBytes = new byte[0]; if (cmdMsg instanceof WSPushMessage) { WSPushMessage wsPushMessage = (WSPushMessage) cmdMsg; dataBytes = wsPushMessage.getDataBytes(); } else if (cmdMsg instanceof WSMsgItem) { WSMsgItem wsMsgItem = (WSMsgItem) cmdMsg; dataBytes = wsMsgItem.getSMsg(); } String body = new String(dataBytes, StandardCharsets.UTF_8); logger.info("解析后的内容:{}", body); } }
解析后的内容存在乱码,例如:解析后的内容:� ��K�}���童锦程【798】 �3 �)�>3�F�summer`�|���ahttps://huyaimg.msstatic.com/avatar/1061/66/1b4c1b90aeabdc333212ef43f85007_180_135.jpg?1584006479��u��ahttps://huyaimg.msstatic.com/avatar/1073/f7/5d111b33a50f1d18c09d854a4436ff_180_135.jpg?1649483573�gMـ�gv�������初爱守护���
具体原因是什么?存在二进制数据还是html?
The text was updated successfully, but these errors were encountered:
因为虎牙的消息格式是TARS,https://tarscloud.org
Sorry, something went wrong.
消息字段可以从这里得到,然后继承BaseHuyaMsg写一个消息类,参考HuyaCodecUtil中的解码方法读取消息字段,
BaseHuyaMsg
HuyaCodecUtil
太强了,感谢大佬。一点点心意表示支持!
老板大气,感谢老板的支持
No branches or pull requests
解析后的内容存在乱码,例如:解析后的内容:� ��K�}���童锦程【798】 �3 �)�>3�F�summer`�|���ahttps://huyaimg.msstatic.com/avatar/1061/66/1b4c1b90aeabdc333212ef43f85007_180_135.jpg?1584006479��u��ahttps://huyaimg.msstatic.com/avatar/1073/f7/5d111b33a50f1d18c09d854a4436ff_180_135.jpg?1649483573�gMـ�gv�������初爱守护���
具体原因是什么?存在二进制数据还是html?
The text was updated successfully, but these errors were encountered: