Interface SocketIOListener


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

      • handleNamespace

        boolean handleNamespace​(@Nonnull
                                java.lang.String name)
        Checks whether this listener wants to handle events for the given namespace.
        Parameters:
        name - name of the namespace to check.
        Returns:
        true if this listener will handle events for this namespace.
      • onConnect

        void onConnect​(@Nonnull
                       SocketIOSocket socket)
        Called when a socket connects.
        Parameters:
        socket - the socket.
      • onDisconnect

        void onDisconnect​(@Nonnull
                          SocketIOSocket socket,
                          @Nullable
                          java.lang.String reason)
        Called when a socket disconnects. Note that prior to this, the socket listener on the socket is called.
        Parameters:
        socket - the socket that disconnected.
        reason - informative reason