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

30 lines
899 B
TypeScript
Raw Normal View History

/// <reference types="q" />
import * as plugins from "./smartsocket.plugins";
2016-08-09 21:37:25 +00:00
import { ISocketFunctionCall } from "./smartsocket.classes.socketfunction";
import { SocketConnection } from "./smartsocket.classes.socketconnection";
2016-08-07 16:59:39 +00:00
/**
* interface for class SmartsocketClient
*/
export interface ISmartsocketClientOptions {
port: number;
url: string;
2016-08-14 01:25:26 +00:00
alias: string;
role: string;
password: string;
2016-08-07 16:59:39 +00:00
}
export declare class SmartsocketClient {
2016-08-14 01:25:26 +00:00
alias: string;
role: string;
2016-08-09 21:37:25 +00:00
socketConnection: SocketConnection;
serverUrl: string;
serverPort: number;
serverPassword: string;
2016-08-09 21:37:25 +00:00
constructor(optionsArg: ISmartsocketClientOptions);
2016-08-14 01:25:26 +00:00
/**
* connect the client to the server
*/
connect(): plugins.q.Promise<{}>;
disconnect(): plugins.q.Promise<{}>;
serverCall(functionNameArg: string, dataArg: ISocketFunctionCall): plugins.q.Promise<{}>;
2016-08-07 16:59:39 +00:00
}