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