diff --git a/src/ts/@overflow/webapp/client/central/webapp/client.ts b/src/ts/@overflow/webapp/client/central/webapp/client.ts new file mode 100644 index 0000000..033c730 --- /dev/null +++ b/src/ts/@overflow/webapp/client/central/webapp/client.ts @@ -0,0 +1,60 @@ + +export default class WebAppClient { + private url: string; + private conn: WebSocket; + + private pendingRequests: Map; + + public constructor(url: string) { + this.url = url; + + } + + /** + * connect + */ + public connect(): Promise { + return new Promise((resolve, reject) => { + try { + this.conn = new WebSocket(this.url); + } catch(e) { + console.log(e); + } + }); + } + + /** + * close + */ + public close(): Promise { + return new Promise((resolve, reject) => { + try { + this.conn.close(); + } catch(e) { + console.log(e); + } + }); + } + + /** + * close + */ + public send(): void { + + } + + /** + * close + */ + public call(method: string, ...params: any[]): void { + + } + /** + * close + */ + public callTimeout(): void { + + } + + +}