mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 18:38:33 +00:00
GH-10: Serial monitor should spare WS connection.
Closes #10. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -20,7 +20,8 @@ export const MonitorService = Symbol('MonitorService');
|
||||
export interface MonitorService extends JsonRpcServer<MonitorServiceClient> {
|
||||
connect(config: MonitorConfig): Promise<Status>;
|
||||
disconnect(): Promise<Status>;
|
||||
send(data: string | Uint8Array): Promise<Status>;
|
||||
send(message: string): Promise<Status>;
|
||||
request(): Promise<{ message: string }>;
|
||||
}
|
||||
|
||||
export interface MonitorConfig {
|
||||
@@ -51,14 +52,9 @@ export namespace MonitorConfig {
|
||||
|
||||
export const MonitorServiceClient = Symbol('MonitorServiceClient');
|
||||
export interface MonitorServiceClient {
|
||||
notifyRead(event: MonitorReadEvent): void;
|
||||
notifyError(event: MonitorError): void;
|
||||
}
|
||||
|
||||
export interface MonitorReadEvent {
|
||||
readonly data: string;
|
||||
}
|
||||
|
||||
export interface MonitorError {
|
||||
readonly message: string;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user