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
我看代码kcp的connectid是客户端自增的,服务器根据两边ip地址做个map。如果一个客户端重启之后,服务器是不是要重启才能正确使用呢
The text was updated successfully, but these errors were encountered:
好久没看代码了,应该不用,至多当作一个新的客户端来看待。
Sorry, something went wrong.
多谢作者回复,我觉得应该也是不用的,不然用起来太麻烦。但是看代码里是用两个链接两端的ip作为key来记录相关信息的。这样子一个kcp对象也就只能存在一个key中,而且,kcp需要用connectionid来区分链接,代码中的client使用一个静态变量从0开始累加,当客户端重启后又从0开始,server里connectionid为0 的kcp对象里的una等信息和新的客户端对象对不上,是收不到数据的。感觉这时候server应该是没办法的。不知道是不是我看代码忽略了什么
如果真是有这个问题,哪应该就是bug,以测试结果为准 话说好久没看这部分的代码了,都快忘光了,惭愧! 如果有兴趣欢迎针对这个bug提pr修复,谢谢!
No branches or pull requests
我看代码kcp的connectid是客户端自增的,服务器根据两边ip地址做个map。如果一个客户端重启之后,服务器是不是要重启才能正确使用呢
The text was updated successfully, but these errors were encountered: