addConnectionEventHandler method
- String identifier,
- ConnectionEventHandler handler
Adds the connection event handler. After calling this method, you can handle new connection events when they arrive.
Param identifier
The custom handler identifier, which 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;
}