Interface Session.ConnectionListener

    • Method Detail

      • onConnectionCreated

        void onConnectionCreated​(Session session,
                                 Connection connection)
        Invoked when another client connects to the session. The Connection object represents the client's connection to the session. Note that this method is invoked when other clients connect to the session. When your own client client connects, the Session.SessionListener.onConnected(Session session) method is called.
        Parameters:
        session - The session.
        connection - The new connection in the session.
      • onConnectionDestroyed

        void onConnectionDestroyed​(Session session,
                                   Connection connection)
        Invoked when another client leaves the session. The Connection object represents the client's previous connection to the session. When your own client client disconnects, the Session.SessionListener.onDisconnected(Session session) method is called.
        Parameters:
        session - The session.
        connection - The connection that left the session the session.