addEventHandler method

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

~english 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. ~end

~chinese 添加房间事件处理程序。调用此方法后,您可以在新的房间事件到达时处理它们。

Param identifier 自定义聊天室事件 ID,用于查找相应的处理程序。

Param handler 聊天室事件 请参见 ChatRoomEventHandler. ~end

Implementation

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