/** * Platform-neutral pieces of the transport seam. * * Lives in its own module so both the Node `transport.ts` factory and the * browser `transport.browser.ts` stub can re-export the same symbols * without a re-export cycle through `package.json.browser`'s * `transport.js → transport.browser.js` remap. * * Today this file holds `validateCloseReason` + the RFC 6455 byte cap. * Any future platform-neutral transport helper (header-shape validation, * scheme normalization, etc.) belongs here for the same reason. */ /** * RFC 6455 §5.5.1: the close-frame application body — the `reason` string * after the 2-byte status code — must be ≤ 123 bytes when UTF-8 encoded. * `ws` (and any spec-compliant peer) crashes when handed a longer value. */ export declare const CLOSE_FRAME_REASON_MAX_BYTES = 123; /** * Validate that a WS close-frame reason fits in the RFC 6455 cap. * * Used internally by the default Node factory's `close()` wrapper, and * exported so custom-transport authors can reach for the same typed-error * behavior before forwarding a reason into their own underlying socket. * `undefined` is a no-op (the factory closes without a reason). * * Throws `QodoTransportError` on overflow. */ export declare function validateCloseReason(reason: string | undefined): void; //# sourceMappingURL=transport.shared.d.ts.map