smartsocket/ts/smartsocket.classes.smartsocketclient.ts

38 lines
1.1 KiB
TypeScript

import * as plugins from "./smartsocket.plugins"
// import interfaces
import { ISocketFunctionCall } from "./smartsocket.classes.socketfunction";
import { ISocketRequestDataObject } from "./smartsocket.classes.socketrequest"
// import classes
import { SocketConnection } from "./smartsocket.classes.socketconnection";
import { SocketFunction } from "./smartsocket.classes.socketfunction";
import { SocketRequest } from "./smartsocket.classes.socketrequest";
/**
* interface for class SmartsocketClient
*/
export interface ISmartsocketClientOptions {
port: number;
url: string;
}
export class SmartsocketClient {
socketConnection:SocketConnection;
constructor(){
};
serverCall(functionNameArg:string,dataArg:ISocketFunctionCall){
let socketRequest = new SocketRequest({
side:"requesting",
originSocketConnection:this.socketConnection,
shortId:plugins.shortid.generate(),
funcCallData:{
funcName: functionNameArg,
funcDataArg:dataArg
}
});
}
}