| 621 | }(this, this._url, this._token, () => (this._mode = 3, this._send(), this._resubscribe(), this)); |
| 622 | } |
| 623 | _wrapper(i) { |
| 624 | return (function() { |
| 625 | const t = [].slice.call(arguments); |
| 626 | let n = null; |
| 627 | const s = new Promise((a, o) => { |
| 628 | n = { data: { id: this._uid(), name: i, args: t }, status: 1, resolve: a, reject: o }, this._queue.push(n); |
| 629 | }); |
| 630 | return this.onCall(n, s), this._mode === 3 ? this._send(n) : setTimeout(() => this._send(), 1), s; |
| 631 | }).bind(this); |
| 632 | } |
| 633 | _uid() { |
| 634 | return (this._seed++).toString(); |
| 635 | } |