onconnect method
void
onconnect(
- dynamic id,
- dynamic pid
Called upon server connect.
@api private
Implementation
void onconnect(id, pid) {
this.id = id;
this.pid = pid; // defined only if connection state recovery is enabled
connected = true;
disconnected = false;
emit('connect');
emitBuffered();
}