首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有时在Android Autobahn上丢失Websockets连接

有时在Android Autobahn上丢失Websockets连接
EN

Stack Overflow用户
提问于 2016-01-19 05:17:09
回答 1查看 1.1K关注 0票数 2

我在安卓和iOS上都有聊天应用。在Android上我用的是Autobahn。在iOS上,我使用SocketRocket。在服务器端,我使用Autobahn实现Python。

有时,由于连接丢失,我的消息将无法在Android上发送。我还没有在iOS上看到过这个问题。我不认为这是服务器问题,因为它一直在iOS上正常工作(据我所知)。我还没重新启动服务器什么的。有时候,这些信息可以在Android上运行。

下面是我试图发送消息的日志消息:

代码语言:javascript
复制
01-18 23:49:51.307 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: opening handshake received

01-18 23:49:51.379 1875-1875/com.greenrobot.yesorno D/MoPub: Refresh disabled for ad unit (8fb0facec32111e295fa123138070049).

01-18 23:49:51.383 1875-1918/com.greenrobot.yesorno D/OpenGLRenderer: endAllStagingAnimators on 0xdd232b80 (ListView) with handle 0xe12c0f00

01-18 23:49:58.960 1875-2726/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: run() : ConnectionLost

01-18 23:49:58.961 1875-2726/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: ended

01-18 23:49:58.961 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: fail connection [code = 3, reason = WebSockets connection lost

01-18 23:49:58.961 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketReader: quit

01-18 23:49:58.961 1875-2727/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketWriter: ended

01-18 23:49:58.962 1875-1875/com.greenrobot.yesorno D/de.tavendo.autobahn.WebSocketConnection: worker threads stopped

有没有人知道如何解决这个连接丢失的问题,或者您知道另一个用于Android的websocket库吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-01-19 05:33:01

Autobahn并不是一个支持良好的Android websocket实现。对我来说,与Autobahn的交易破坏者是SSL/TLS (wss)支持,它似乎仍然不被支持。

这个问题涵盖了现有的安卓websocket实现。答案详细介绍了这些实现中已知的一些问题。根据您的特定项目需求,您可能会消除其中的几个选项。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34868969

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档