update structure

This commit is contained in:
2016-08-12 01:32:57 +02:00
parent 19a883c641
commit cb3d7f4d7b
4 changed files with 65 additions and 12 deletions

View File

@@ -23,7 +23,7 @@ export class Smartsocket {
/**
* the standard handler for new socket connections
*/
private _handleSocket(socketArg) {
private _handleSocketConnection(socketArg) {
let socketConnection: SocketConnection = new SocketConnection({
authenticated:false,
socket:socketArg
@@ -41,7 +41,7 @@ export class Smartsocket {
startServer = () => {
this.io = plugins.socketIo(this.options.port);
this.io.on('connection', (socketArg) => {
this._handleSocket(socketArg);
this._handleSocketConnection(socketArg);
});
}
closeServer = () => {
@@ -51,5 +51,10 @@ export class Smartsocket {
});
this.openSockets.wipe();
this.io.close();
};
// communication
clientCall(){
// TODO: target specific client and initiate response
}
}