Created
May 1, 2020 13:34
-
-
Save ekoo/ec429bb62717d163a1010b5c0c1fe312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service.observeWebSocketEvent() | |
.filter{ it is WebSocket.Event.OnConnectionOpened<*>} | |
.subscribe ({ service.sendSubscribe(Subscribe()) }, | |
{error -> error.printStackTrace()}) | |
service.observeResponse() | |
.subscribeOn(Schedulers.io()) | |
.subscribe({ | |
response.postValue(it) | |
}, {error -> error.printStackTrace()}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment