@openevstack/ocpp-rpc
Version:
⚡ A lightweight, production-ready RPC server built with Express and WebSocket for handling OCPP-based EV charger communication. Part of the OpenEVStack ecosystem.
15 lines (14 loc) • 514 B
TypeScript
/// <reference types="node" />
import { Socket } from "net";
/**
* Gracefully abort a WebSocket handshake.
*/
export declare function abortHandshake(socket: Socket, code: number, message?: string, headers?: Record<string, string>): void;
/**
* Parses a `Sec-WebSocket-Protocol` header value.
*/
export declare function parseSubprotocols(header: string): Set<string>;
/**
* Validates if a status code is allowed in a WebSocket close frame.
*/
export declare function isValidStatusCode(code: number): boolean;