Czar
01/23/2018, 10:54 AMsocket
.on(Socket.EVENT_CONNECT) { data ->
data.print("Socket Connect")
socket.emit("login", "{\"bearer_token\": \"${prefs.authToken}\"}")
}.on("login_response") { data ->
data.print("Login Response")
emitSubscribe()
mConnectionStatus.postValue(true)
}.on("subscribe_response") { data ->
data.print("Subscribe Response")
}.on(Socket.EVENT_DISCONNECT) { data ->
data.print("Socket Disconnect")
socket.connect()
}