/// /// import * as http from 'http'; import { Objectmap } from 'lik'; import { SocketConnection } from './smartsocket.classes.socketconnection'; import { SocketRole } from './smartsocket.classes.socketrole'; export interface ISmartsocketConstructorOptions { port: number; } export declare class Smartsocket { options: ISmartsocketConstructorOptions; httpServer: http.Server; io: SocketIO.Server; openSockets: Objectmap; socketRoles: Objectmap; constructor(optionsArg: ISmartsocketConstructorOptions); /** * starts listening to incoming sockets: */ startServer(): Promise<{}>; /** * starts the server with another server */ setServer(httpServerArg: http.Server): Promise; /** * closes the server */ closeServer(): Promise; /** * allows call to specific client. */ clientCall(functionNameArg: string, dataArg: any, targetSocketConnectionArg: SocketConnection): Promise<{}>; /** * adds socketRoles */ addSocketRoles(socketRolesArray: SocketRole[]): void; /** * the standard handler for new socket connections */ private _handleSocketConnection(socketArg); }