socket.io-client-java
socket.io-client-java copied to clipboard
Some socket events after some times stops being received at all in the app side, even on subscribing to those events they are not received.
Can there be possibility that the socket events even if subscribed not being received at all but other events are being received but some particular events even after subscribing to the events are not being received. Using latest Socket IO version 2.1.2.
This is my socket IO creation code
@NetworkModule.IxfiSocket @Singleton @Provides fun provideSocket(option: IO.Options) = IO.socket(BuildConfig.SOCKET_URL, option)!!
@Singleton
@Provides
fun getSocketOptions(@NetworkModule.SocketService client: OkHttpClient): IO.Options {
val opts = IO.Options()
opts.callFactory = client
opts.reconnection = true
opts.timeout = 60 * 1000
opts.webSocketFactory = client
return opts
}
fun subscribeTxnEvents() { socketIo.off(AppConstants.EVENT_TXN_STATUS) socketIo.on(AppConstants.EVENT_TXN_STATUS, onEventTxnStatus) }