onConnect method

void onConnect(
  1. EventHandler handler
)

Implementation

void onConnect(EventHandler handler) {
  on('connect', handler);
}