import * as plugins from './smartsocket.plugins'; import { SocketConnection } from './smartsocket.classes.socketconnection'; import { SocketFunction } from './smartsocket.classes.socketfunction'; import { SocketRequest } from './smartsocket.classes.socketrequest'; import { SocketRole } from './smartsocket.classes.socketrole'; import * as SocketIO from 'socket.io'; export interface ISmartsocketConstructorOptions { port?: number; } export declare class Smartsocket { /** * a unique id to detect server restarts */ shortId: string; options: ISmartsocketConstructorOptions; io: SocketIO.Server; socketConnections: plugins.lik.ObjectMap; socketRoles: plugins.lik.ObjectMap; socketFunctions: plugins.lik.ObjectMap>; socketRequests: plugins.lik.ObjectMap>; private socketServer; constructor(optionsArg: ISmartsocketConstructorOptions); setExternalServer(serverType: 'smartexpress', serverArg: any): Promise; /** * starts smartsocket */ start(): Promise; /** * stops smartsocket */ stop(): Promise; /** * allows call to specific client. */ clientCall(functionNameArg: T['method'], dataArg: T['request'], targetSocketConnectionArg: SocketConnection): Promise; /** * adds socketRoles */ addSocketRoles(socketRolesArray: SocketRole[]): void; addSocketFunction(socketFunction: SocketFunction): void; /** * the standard handler for new socket connections */ private _handleSocketConnection; }