onconnect method

void onconnect()

Called upon server connect.

@api private

Implementation

void onconnect() {
  connected = true;
  disconnected = false;
  emit('connect');
  emitBuffered();
}