addEventHandler method

void addEventHandler(
  1. String identifier,
  2. ChatRoomEventHandler handler
)

Adds the room 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 handle for room event. See ChatRoomEventHandler.

Implementation

void addEventHandler(
  String identifier,
  ChatRoomEventHandler handler,
) {
  _eventHandlesMap[identifier] = handler;
}