addConnectionEventHandler method Null safety

void addConnectionEventHandler(
  1. String identifier,
  2. ConnectionEventHandler handler
)

Adds the connection event handler. After calling this method, you can handle for new room event when they arrive.

Param identifier The custom handler identifier, is used to find the corresponding handler.

Param handler The handler for connection event. See ConnectionEventHandler.

Implementation

void addConnectionEventHandler(
  String identifier,
  ConnectionEventHandler handler,
) {
  _connectionEventHandler[identifier] = handler;
}