Package 

Class SocketListener


  • 
    public class SocketListener
    
                        

    Listener which is invoked for WebSocket events.

    • Constructor Detail

      • SocketListener

        SocketListener()
    • Method Detail

      • getDeliverOnMainThread

         Boolean getDeliverOnMainThread()

        The callbacks are by default delivered on the main thread. Changing this property to false will deliver the callbacks on their originating threads.

        Set to false for faster callback delivery on the original thread (no unnecessary context switching).

      • onConnecting

         Unit onConnecting()

        Invoked when the connection begins to establish and socket state changes to Connecting.

      • onError

         Unit onError(Error error)

        Invoked when there is any error in this web socket connection.

        Parameters:
        error - Error object with the error details.
      • onEvent

         Unit onEvent(ChatEvent event)

        Invoked when we receive any successful event.

        Parameters:
        event - parsed ChatEvent received in this web socket connection.