()
| 450 | } |
| 451 | |
| 452 | async close() { |
| 453 | if (this._closed) |
| 454 | return; |
| 455 | this._closed = true; |
| 456 | for (const socket of this._sockets) |
| 457 | socket.destroy(); |
| 458 | this._sockets.clear(); |
| 459 | await new Promise(f => this._server.close(f)); |
| 460 | } |
| 461 | |
| 462 | onSocketRequested(payload: SocksSocketRequestedPayload) { |
| 463 | if (!this._patternMatcher(payload.host, payload.port)) { |
no test coverage detected