/** * MHub client for direct (local) connection to an MHub server instance. * * A LocalClient has the same interface as e.g. NodeClient, but directly connects * to a Hub without using e.g. sockets. * This is useful for tests, or when embedding an MHub server and client into a * program. */ import { BaseClient } from "./baseclient"; import { Hub } from "./hub"; /** * 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 LocalClient extends BaseClient { /** * Create new connection to MServer. * @param url Websocket URL of MServer, e.g. ws://localhost:13900 * @param options Optional options, see `MClientOptions`. */ constructor(hub: Hub, name: string); } export default LocalClient;