RxSocketClient
RxSocketClient copied to clipboard
:rocket:Reactive Socket APIs for Android, Java and Kotlin, powered by RxJava2
Hi, Great library, easy to use and mostly stable. I ran into a problem on a certain device when trying to establish a connection. It only affects a specific device...
I'm connecting to the server, then I can receive data from server, but can't send data. My config: ``` socketClient = RxSocketClient.create( SocketConfig.Builder() .setIp(ip) .setPort(port) .setCharset(Charsets.UTF_8) .setThreadStrategy(ThreadStrategy.SYNC) .setTimeout(5 * 1000)...
首先:有幸看到这个优秀的开源项目,并用于项目实践,多谢 目前发现如下bug: 1.连接上断网后,心跳包会发信息,导致奔溃 SocketClient initHeartBeat 解决:if (mSocket != null && mSocket!!.isConnected && !mSocket!!.isClosed) { mIPoster.enqueue(mHeartBeatConfig.data ?: ByteArray(0)) } 2. 断网后网络恢复重连。因为作者是socket 直接初始化,导致断网前的socket 一直在关闭状态。 解决 :在connect 方法里面初始化mSocket= Socket() 3. 断网重连恢复的方法。 需要再次新生成socket 通道。...
如题,还有希望加入超时回调,这样更方便一点