* Called upon server connect. * * @private
(id: string, pid: string)
| 827 | * @private |
| 828 | */ |
| 829 | private onconnect(id: string, pid: string) { |
| 830 | debug("socket connected with id %s", id); |
| 831 | this.id = id; |
| 832 | this.recovered = pid && this._pid === pid; |
| 833 | this._pid = pid; // defined only if connection state recovery is enabled |
| 834 | this.connected = true; |
| 835 | this.emitBuffered(); |
| 836 | this._drainQueue(true); |
| 837 | this.emitReserved("connect"); |
| 838 | } |
| 839 | |
| 840 | /** |
| 841 | * Emit buffered events (received and emitted). |
no test coverage detected