* Subscribe to open, close and packet events * * @private
()
| 311 | * @private |
| 312 | */ |
| 313 | private subEvents(): void { |
| 314 | if (this.subs) return; |
| 315 | |
| 316 | const io = this.io; |
| 317 | this.subs = [ |
| 318 | on(io, class="st">"open", this.onopen.bind(this)), |
| 319 | on(io, class="st">"packet", this.onpacket.bind(this)), |
| 320 | on(io, class="st">"error", this.onerror.bind(this)), |
| 321 | on(io, class="st">"close", this.onclose.bind(this)), |
| 322 | ]; |
| 323 | } |
| 324 | |
| 325 | /** |
| 326 | * Whether the Socket will try to reconnect when its Manager connects or reconnects. |