1 |
|
2 |
|
3 |
|
4 | export interface WriteBuffer {
|
5 | writeUint8(byte: number): this;
|
6 | writeUint16(value: number): this;
|
7 | writeUint32(value: number): this;
|
8 | writeString(value: string): this;
|
9 | writeBytes(value: Uint8Array): this;
|
10 | writeNumber(value: number): this;
|
11 | writeLength(value: number): this;
|
12 | writeRaw(bytes: Uint8Array): this;
|
13 | |
14 |
|
15 |
|
16 |
|
17 | commit(): void;
|
18 | }
|
19 | export declare class ForwardingWriteBuffer implements WriteBuffer {
|
20 | protected readonly underlying: WriteBuffer;
|
21 | constructor(underlying: WriteBuffer);
|
22 | writeUint8(byte: number): this;
|
23 | writeUint16(value: number): this;
|
24 | writeUint32(value: number): this;
|
25 | writeLength(value: number): this;
|
26 | writeString(value: string): this;
|
27 | writeBytes(value: Uint8Array): this;
|
28 | writeNumber(value: number): this;
|
29 | writeRaw(bytes: Uint8Array): this;
|
30 | commit(): void;
|
31 | }
|
32 | /**
|
33 | * A buffer maintaining a read position in a buffer containing a received message capable of
|
34 | * reading primitive values.
|
35 | */
|
36 | export interface ReadBuffer {
|
37 | readUint8(): number;
|
38 | readUint16(): number;
|
39 | readUint32(): number;
|
40 | readString(): string;
|
41 | readNumber(): number;
|
42 | readLength(): number;
|
43 | readBytes(): Uint8Array;
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | sliceAtReadPosition(): ReadBuffer;
|
51 | }
|
52 |
|
\ | No newline at end of file |