(socket: Duplex)
| 198 | } |
| 199 | |
| 200 | function socketWriteServiceUnavailable(socket: Duplex): void { |
| 201 | socket.write('HTTP/1.1 503 Service Unavailable\r\nRetry-After: 5\r\nConnection: close\r\n\r\n'); |
| 202 | socket.destroy(); |
| 203 | } |
| 204 | |
| 205 | function setDuplexTimeout(socket: Duplex, timeoutMs: number, onTimeout: () => void): void { |
| 206 | const timeoutCapable = socket as unknown as { |
no test coverage detected