(path: string)
| 93 | // --------------------------------------------------------------------------- |
| 94 | |
| 95 | export function assertValidUnixSocketPath(path: string): void { |
| 96 | if (process.platform === 'win32') return |
| 97 | const byteLength = Buffer.byteLength(path, 'utf8') |
| 98 | if (byteLength > MAX_UNIX_SOCKET_PATH_LENGTH) { |
| 99 | throw new Error( |
| 100 | `[udsMessaging] socket path is ${byteLength} bytes (max ${MAX_UNIX_SOCKET_PATH_LENGTH}): ${path}`, |
| 101 | ) |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Default socket path based on PID. Uses a flat file under a short temp |
no outgoing calls
no test coverage detected