import * as plugins from './smartsocket.plugins.js'; import * as interfaces from './interfaces/index.js'; import { SocketConnection } from './smartsocket.classes.socketconnection.js'; import { SocketFunction } from './smartsocket.classes.socketfunction.js'; import { SocketRequest } from './smartsocket.classes.socketrequest.js'; /** * interface for class SmartsocketClient */ export interface ISmartsocketClientOptions { port: number; url: string; alias: string; autoReconnect?: boolean; maxRetries?: number; initialBackoffDelay?: number; maxBackoffDelay?: number; } export declare class SmartsocketClient { shortId: string; remoteShortId: string | null; alias: string; socketConnection?: SocketConnection; serverUrl: string; serverPort: number; autoReconnect: boolean; maxRetries: number; initialBackoffDelay: number; maxBackoffDelay: number; currentRetryCount: number; currentBackoffDelay: number; eventSubject: plugins.smartrx.rxjs.Subject; eventStatus: interfaces.TConnectionStatus; socketFunctions: plugins.lik.ObjectMap>; socketRequests: plugins.lik.ObjectMap>; private tagStore; private tagStoreSubscription?; /** * adds a tag to a connection */ addTag(tagArg: interfaces.ITag): Promise; /** * gets a tag by id * @param tagIdArg */ getTagById(tagIdArg: interfaces.ITag['id']): Promise>; /** * removes a tag from a connection */ removeTagById(tagIdArg: interfaces.ITag['id']): Promise; constructor(optionsArg: ISmartsocketClientOptions); addSocketFunction(socketFunction: SocketFunction): void; private isReconnecting; private isConnecting; /** * connect the client to the server */ connect(): Promise; private disconnectRunning; private currentSocket; private connectionAttemptId; /** * disconnect from the server */ disconnect(useAutoReconnectSetting?: boolean): Promise; /** * stops the client completely */ stop(): Promise; /** * dispatches a server call * @param functionNameArg * @param dataArg */ serverCall(functionNameArg: T['method'], dataArg: T['request']): Promise; private updateStatus; /** * Resets the reconnection state */ resetReconnectionState(): void; }