/** * MHub client library using native browser WebSocket. */ import { BaseClient, BaseClientOptions } from "./baseclient"; /** * Options to be passed to MClient constructor. */ export interface MClientOptions extends BaseClientOptions { } export declare const defaultClientOptions: MClientOptions; /** * MHub client using server-side WebSocket. * * Allows subscribing and publishing to MHub server nodes. * * @event open() Emitted when connection was established. * @event close() Emitted when connection was closed. * @event error(e: Error) Emitted when there was a connection, server or protocol error. * @event message(m: Message) Emitted when message was received (due to subscription). */ export declare class MClient extends BaseClient { private _url; /** * Create new connection to MServer. * @param url Websocket URL of MServer, e.g. ws://localhost:13900 * @param options Optional options, see `MClientOptions`. */ constructor(url: string, options?: MClientOptions); /** * Full URL of MHub connection. */ get url(): string; } export default MClient;