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

24 lines
716 B
TypeScript
Raw Normal View History

2016-08-07 12:58:20 +00:00
/// <reference types="socket.io" />
import { Objectmap } from "lik";
2016-08-07 16:59:39 +00:00
import { SocketRole } from "./smartsocket.classes.socketrole";
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;
openSockets: Objectmap;
2016-08-08 16:20:00 +00:00
registeredFunctions: Objectmap;
2016-08-07 16:59:39 +00:00
constructor(optionsArg: ISmartsocketConstructorOptions);
/**
* the standard handler for new socket connections
*/
2016-08-08 16:20:00 +00:00
private _handleSocket(socketArg);
registerFunction(socketRoleArg: SocketRole): void;
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;
}