UNPKG

@citrineos/util

Version:

The OCPP util module which supplies helpful utilities like cache and queue connectors, etc.

24 lines 673 B
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project // // SPDX-License-Identifier: Apache-2.0 import { Duplex } from 'stream'; export class UpgradeUnknownError extends Error { constructor(message) { super(message); this.name = 'UpgradeUnknownError'; } terminateConnection(socket) { try { socket.write('HTTP/1.1 404 Not Found\r\n'); socket.write('\r\n'); socket.end(); socket.destroy(); return true; } catch (error) { this.message = error.message; return false; } } } //# sourceMappingURL=UnknownError.js.map