2016-08-12 03:56:40 +00:00
|
|
|
/// <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;
|
2016-08-12 03:56:40 +00:00
|
|
|
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;
|
2016-08-12 03:56:40 +00:00
|
|
|
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<{}>;
|
2016-08-12 03:56:40 +00:00
|
|
|
serverCall(functionNameArg: string, dataArg: ISocketFunctionCall): plugins.q.Promise<{}>;
|
2016-08-07 16:59:39 +00:00
|
|
|
}
|