fix(core): update

This commit is contained in:
2019-08-12 22:31:40 +02:00
parent 9d26fff986
commit 33fbabdd72
10 changed files with 190 additions and 227 deletions

View File

@@ -1,5 +1,4 @@
import * as plugins from './smartsocket.plugins';
import * as helpers from './smartsocket.helpers';
// classes
import { Objectmap } from '@pushrocks/lik';
@@ -21,6 +20,8 @@ export class Smartsocket {
public io: SocketIO.Server;
public openSockets = new Objectmap<SocketConnection>();
public socketRoles = new Objectmap<SocketRole>();
public socketFunctions = new Objectmap<SocketFunction>();
public socketRequests = new Objectmap<SocketRequest>();
private socketServer = new SocketServer(this);
@@ -74,7 +75,7 @@ export class Smartsocket {
targetSocketConnectionArg: SocketConnection
) {
const done = plugins.smartpromise.defer();
const socketRequest = new SocketRequest({
const socketRequest = new SocketRequest(this, {
funcCallData: {
funcDataArg: dataArg,
funcName: functionNameArg
@@ -100,6 +101,10 @@ export class Smartsocket {
return;
}
public addSocketFunction(socketFunction: SocketFunction) {
this.socketFunctions.add(socketFunction);
}
/**
* the standard handler for new socket connections
*/