-
Notifications
You must be signed in to change notification settings - Fork 114
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
接收图片base64数据会断开 #52
Comments
断开是由什么原因导致的?服务端关闭,还是出了什么异常 ? |
我接收其他数据都正常,后台服务器发送base64图片数据就会断开,我试用了另外一个框架demo,能够正常接收到base64数据,我安卓端没报什么异常,我开始以为是服务器那边的问题,因为服务器发送图片数据安卓这边就收不到信息,会断开。今天我试了另外一个框架正常收到。 |
你有没有对接收数据长度进行限制,base64的数据有的有几十k |
你调用代码贴一下,我看看 |
好的,谢谢大神! MainActivity 里面
|
依赖的是你这个版本的implementation 'com.dhh:websocket:2.1.2' |
你重写一下 WebSocketSubscriber 的 protected void onMessage(@nonnull ByteString byteString) 方法试试,看这个 byteString 是否有消息回调 |
protected void onMessage(@nonnull ByteString byteString) { |
03-01 13:38:14.739 31448-31448/com.runvision.g702_sn I/WebMsg: onOpen: |
我没有遇到这种问题,也没有测试的服务器,我也不知道问题出来哪里 |
好的谢谢大神 |
如果你们的测试服务器的URL可以给我的话,我可以帮忙测试一下,看看是什么问题导致的,不方便给的话,就算了。 |
可以啊,方便的,我可以加你微信或者QQ吗?因为那后台要先调用接口发送心跳让设备在线,才能进行发送web socket 消息,我的扣扣同微信396229938 |
在对接平台接收平台发了的base64图片数据会自动断开
The text was updated successfully, but these errors were encountered: