mirror of https://git.tuxpa.in/a/code-server.git
10 lines
256 B
TypeScript
10 lines
256 B
TypeScript
|
export interface SendableConnection {
|
||
|
send(data: Buffer | Uint8Array): void;
|
||
|
}
|
||
|
|
||
|
export interface ReadWriteConnection extends SendableConnection {
|
||
|
onMessage(cb: (data: Uint8Array | Buffer) => void): void;
|
||
|
onClose(cb: () => void): void;
|
||
|
close(): void;
|
||
|
}
|