(code = 1000, reason = '')
| 54 | } |
| 55 | |
| 56 | close(code = 1000, reason = ''): void { |
| 57 | if (this.readyState !== this.OPEN) return |
| 58 | this.readyState = 3 |
| 59 | try { |
| 60 | process.send?.({ type: MSG_SERVER_CLOSE, connectionId: this.connectionId, code, reason }) |
| 61 | } catch { |
| 62 | // Parent may already be gone. |
| 63 | } |
| 64 | this.emit('close', code, reason) |
| 65 | } |
| 66 | |
| 67 | receive(raw: unknown, isBinary: boolean): void { |
| 68 | if (this.readyState !== this.OPEN) return |
no test coverage detected