Interface SocketIOSocketListener

  • @ConsumerType
    public interface SocketIOSocketListener
    Socket.IO Socket listener.
    • Method Detail

      • onEvent

        void onEvent​(@Nonnull
                     java.lang.String name,
                     JSONArray data,
                     SocketIOAck ack)
        Called when a socket receives an event. The ack parameter is not-null if the client requested an 'ack' event. the listener should send the ack as soon as possible.
        name - name of the event.
        data - event arguments
        ack - not null if the client requested an ack.
      • onDisconnect

        void onDisconnect​(java.lang.String reason)
        Called when a socket disconnects.
        reason - informative reason
      • onError

        void onError​(JSONArray data)
        Called when an error occurred
        data - error arguments