Skip to content
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

TCP Push消息给服务端 之后为什么有时候收不到服务端返回的消息,有时候就可以? #4

Open
xiamingwei-sudo opened this issue Dec 19, 2017 · 2 comments

Comments

@xiamingwei-sudo
Copy link

抓包分析可以看到服务端是有push过来内容的,但是没有触发readData;
Tips:模拟器都OK,但是手机很大概率触发不了

@zhu410289616
Copy link
Owner

@Come-Mile 没有触发readData;具体是指没有触发哪个方法呢?

如果是GCDAsynSocket中的方法,那可能是底层的一些问题。
如果是RHSocketKit中的方法没有触发,那就是数据包解码的问题,需要针对应用中定义的数据包格式来定位了。

@xiamingwei-sudo
Copy link
Author

确实是GCDAsynSocket 中的 [strongSelf doReadData]; 方法未触发执行;
个人猜测是服务端异常断开之后,客户端socket 还没从通道里读取数据,就直接抛出了异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants