forked from coder/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnection.ts
More file actions
33 lines (29 loc) · 776 Bytes
/
connection.ts
File metadata and controls
33 lines (29 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
export interface SendableConnection {
send(data: Buffer | Uint8Array): void;
}
export interface ReadWriteConnection extends SendableConnection {
onMessage(cb: (data: Uint8Array | Buffer) => void): void;
onClose(cb: () => void): void;
onDown(cb: () => void): void;
onUp(cb: () => void): void;
close(): void;
}
export enum OperatingSystem {
Windows,
Linux,
Mac,
}
export interface InitData {
readonly os: OperatingSystem;
readonly dataDirectory: string;
readonly workingDirectory: string;
readonly homeDirectory: string;
readonly tmpDirectory: string;
readonly shell: string;
readonly extensionsDirectory: string;
readonly builtInExtensionsDirectory: string;
}
export interface SharedProcessData {
readonly socketPath: string;
readonly logPath: string;
}