first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { WsFrameOpcode } from './constants';
import type { IWriter, IWriterGrowable } from '@jsonjoy.com/util/lib/buffers';
export declare class WsFrameEncoder<W extends IWriter & IWriterGrowable = IWriter & IWriterGrowable> {
readonly writer: W;
constructor(writer?: W);
encodePing(data: Uint8Array | null): Uint8Array;
encodePong(data: Uint8Array | null): Uint8Array;
encodeClose(reason: string, code?: number): Uint8Array;
encodeHdr(fin: 0 | 1, opcode: WsFrameOpcode, length: number, mask: number): Uint8Array;
encodeDataMsgHdrFast(length: number): Uint8Array;
writePing(data: Uint8Array | null): void;
writePong(data: Uint8Array | null): void;
writeClose(reason: string, code?: number): void;
writeHdr(fin: 0 | 1, opcode: WsFrameOpcode, length: number, mask: number): void;
writeDataMsgHdrFast(length: number): void;
writeBufXor(buf: Uint8Array, mask: number): void;
}