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
https://github.com/sinpolib/sokit/releases,这是专门的socket测试工具,一直收不到数据,只有用你提供的android客户端连接过后才能收到,请问是什么原因呢?
The text was updated successfully, but these errors were encountered:
同样的问题,坐等
Sorry, something went wrong.
+1,第三方socket工具作为服务端能收到数据,将收到的数据(字节数组)再发给客户端,客户端收不到,onSocketReadResponse不执行。协议没修改,使用的是默认的(4字节header+body)。
比如发送{“cmd”:0},对应字节数组[00 00 00 09 7B 22 63 6D 64 22 3A 30 7D],socket工具收到后,回复同样的字节数组给客户端(所以协议应该是没问题的),客户端收不到。但使用demo作为服务端能正常收发。
这个问题挺多人遇到了,为什么这么久了还没有答案?
首先您需要符合通讯协议才能收到消息, 通讯协议在WIKI中已经写出,您可以自定义协议,但是您发送的数据需要符合您定义的协议. 默认协议是4个字节包头+包体.包头4字节为一个Int标识包体长度
那如果收发的协议不是一套的呢
No branches or pull requests
https://github.com/sinpolib/sokit/releases,这是专门的socket测试工具,一直收不到数据,只有用你提供的android客户端连接过后才能收到,请问是什么原因呢?
The text was updated successfully, but these errors were encountered: