UNPKG

@iotize/tap

Version:

IoTize Device client for Javascript

18 lines (17 loc) 901 B
/// <reference types="node" /> import { Subject } from 'rxjs'; import { ClientAdapterInterface, RelayServerInterface, RelayServerOptions, ServerAdapterInterface } from '@iotize/tap/relay/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); get 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; }