(connectionId: string, code: number, reason: string)
| 88 | const sockets = new Map<string, IpcPtySocket>() |
| 89 | |
| 90 | const close = (connectionId: string, code: number, reason: string): void => { |
| 91 | try { |
| 92 | process.send?.({ type: MSG_SERVER_CLOSE, connectionId, code, reason }) |
| 93 | } catch { |
| 94 | // Parent may already be gone. |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | const onMessage = (raw: unknown): void => { |
| 99 | const msg = raw && typeof raw === 'object' ? raw as BridgeMessage : null |