add some more logic
This commit is contained in:
@ -4,18 +4,31 @@ import * as plugins from "./smartsocket.plugins";
|
||||
import { Stringmap } from "lik";
|
||||
import { SocketRole } from "./smartsocket.classes.socketrole";
|
||||
|
||||
export interface ISocketFunctionData {
|
||||
// export interfaces
|
||||
|
||||
export interface ISocketFunctionRequestObject {
|
||||
functionName:string,
|
||||
functionData:any,
|
||||
argumentObject:any,
|
||||
shortId:string,
|
||||
responseTimeout?:number
|
||||
};
|
||||
|
||||
export interface ISocketFunctionResponseObject {
|
||||
shortId:string;
|
||||
argumentObject:any;
|
||||
};
|
||||
|
||||
export interface SocketFunctionOptions {
|
||||
name: string;
|
||||
func: any;
|
||||
roles: SocketRole[]; // all roles that are allowed to execute a SocketFunction
|
||||
};
|
||||
|
||||
// export classes
|
||||
|
||||
/**
|
||||
* class SocketFunction respresents a function that can be transparently called using a SocketConnection
|
||||
*/
|
||||
export class SocketFunction {
|
||||
name: string;
|
||||
func: any;
|
||||
@ -41,9 +54,9 @@ export class SocketFunction {
|
||||
}
|
||||
|
||||
/**
|
||||
* handles a function request to this SocketFunction
|
||||
* invokes the function of this SocketFunction
|
||||
*/
|
||||
functionRequest(dataArg:ISocketFunctionData){
|
||||
invoke(dataArg:ISocketFunctionRequestObject){
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user