addConnectionListener static method

dynamic addConnectionListener(
  1. String listenerId,
  2. ConnectionListener listenerClass
)

The ConnectionListener class provides you with all the status of the connection to CometChat web-socket servers

Implementation

static addConnectionListener(
    String listenerId, ConnectionListener listenerClass) {
  _connectionListeners[listenerId] = listenerClass;
}