-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathFrameCodec.d.ts
More file actions
21 lines (17 loc) · 679 Bytes
/
FrameCodec.d.ts
File metadata and controls
21 lines (17 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { Transform } from 'stream';
import { Buffer } from 'buffer';
export class FrameEncoder extends Transform {
constructor();
_transform(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
}
export class FrameDecoder extends Transform {
constructor();
_transform(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
static _nextId: number;
}
export function createLibp2pStream(socket: any): {
source: AsyncGenerator<any, void, unknown>;
sink: (src: AsyncIterable<any>) => Promise<void>;
[Symbol.asyncIterator]: () => AsyncIterator<any>;
};
export function encodeFrame(buffer: Buffer | string): Buffer;