-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
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
心跳包校验不过 #4
Comments
确实不通过好像. 我的结果 "校验码校验失败,数据校验码为:50, 待校验的校验码为:22, " 十进制的 |
我上面列出来的数字都是十六进制的,那咱俩的校验一样 |
@Dufresh HI, 我换了个心跳包可以校验了. 现在卡在分包的处理上. 如何重新把这些包拼起来呢. 或者要求终端重传, 不知道有什么好的方案. 你有什么建议吗? |
@HengCC 不好意思,没有注意到,我这边分包处理是先放到一个缓冲区域(假设n个字节),然后校验最有一个字符,如果是0xfd就把n-1个字节取出来转义到一个转义缓存中,后续的解析处理都是直接从转义缓存中取出来的,解析时候需要判断是否一个完整包,不是的话继续读取网络数据,重复上面流程 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你心跳包校验是0x32,我校验的是0x16,从00开始到03结束
The text was updated successfully, but these errors were encountered: