smartsocket/dist/smartsocket.classes.smartsocket.d.ts

28 lines
921 B
TypeScript
Raw Normal View History

2016-08-07 12:58:20 +00:00
/// <reference types="socket.io" />
/// <reference types="q" />
import * as plugins from "./smartsocket.plugins";
2016-08-07 12:58:20 +00:00
import { Objectmap } from "lik";
2016-08-09 09:42:21 +00:00
import { SocketConnection } from "./smartsocket.classes.socketconnection";
2016-08-07 12:58:20 +00:00
export interface ISmartsocketConstructorOptions {
port: number;
}
export declare class Smartsocket {
2016-08-07 16:59:39 +00:00
options: ISmartsocketConstructorOptions;
2016-08-07 12:58:20 +00:00
io: SocketIO.Server;
2016-08-09 09:42:21 +00:00
openSockets: Objectmap<SocketConnection>;
2016-08-07 16:59:39 +00:00
constructor(optionsArg: ISmartsocketConstructorOptions);
/**
* the standard handler for new socket connections
*/
private _handleSocketConnection(socketArg);
2016-08-07 16:59:39 +00:00
/**
* starts listening to incling sockets:
*/
startServer: () => void;
2016-08-07 12:58:20 +00:00
closeServer: () => void;
/**
* allows call to specific client.
*/
clientCall(functionNameArg: string, dataArg: any, targetSocketConnectionArg: SocketConnection): plugins.q.Promise<{}>;
2016-08-07 12:58:20 +00:00
}