* Initializes the `Adapter` for this nsp. * Run upon changing adapter by `Server#adapter` * in addition to the constructor. * * @private
()
| 195 | * @private |
| 196 | */ |
| 197 | _initAdapter(): void { |
| 198 | // @ts-ignore |
| 199 | this.adapter = new (this.server.adapter()!)(this); |
| 200 | |
| 201 | Promise.resolve(this.adapter.init()).catch((err) => { |
| 202 | debug("error while initializing adapter: %s", err); |
| 203 | }); |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Registers a middleware, which is a function that gets executed for every incoming {@link Socket}. |
no test coverage detected