2016-08-07 12:58:20 +00:00
|
|
|
/// <reference types="socket.io" />
|
|
|
|
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
|
|
|
|
*/
|
2016-08-12 03:56:40 +00:00
|
|
|
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;
|
2016-08-12 03:56:40 +00:00
|
|
|
clientCall(): void;
|
2016-08-07 12:58:20 +00:00
|
|
|
}
|