onconnect method
void
onconnect(
- dynamic id,
- dynamic pid
Called upon server connect.
@api private
Implementation
void onconnect(id, pid) {
this.id = id;
recovered = pid != null && _pid == pid;
_pid = pid; // defined only if connection state recovery is enabled
connected = true;
emitBuffered();
emitReserved("connect");
_drainQueue(true);
}