UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

18 lines (17 loc) 883 B
import { RelayServerInterface, RelayServerOptions } from "../api"; import { Subject } from "rxjs"; import { ClientAdapterInterface, ServerAdapterInterface } from "../api"; export declare class RelayServer implements RelayServerInterface { protected _server: ServerAdapterInterface; protected _clients: ClientAdapterInterface[]; protected _subscription?: Subject<any>; protected _params: RelayServerOptions; constructor(_server: ServerAdapterInterface, params?: RelayServerOptions); readonly server: ServerAdapterInterface; addClient(socket: ClientAdapterInterface): this; removeClient(client: ClientAdapterInterface): this; start(): Promise<any>; stop(): Promise<void>; broadcastMessage(message: string | Buffer, sender: ClientAdapterInterface): void; protected messageToLog(message: string | Buffer | any): string; }