(...args)
| 22 | |
| 23 | module.exports = wsBus = class WsBus extends CocoClass { |
| 24 | constructor (...args) { |
| 25 | wsBus.prototype.subscriptions = { |
| 26 | 'auth:me-synced': 'onMeSynced', |
| 27 | } |
| 28 | super() // make sure we set prototype.subscriptions first |
| 29 | |
| 30 | this.ws = null |
| 31 | this.wsInfos = { inited: false, friends: {} } |
| 32 | this.connected = false |
| 33 | this.reconnectInterval = undefined |
| 34 | this.init() |
| 35 | } |
| 36 | |
| 37 | init () { |
| 38 | this.ws = websocket.setupBaseWS() |