send (msg) {
    if (!this._ws || !this._isOpen) {
      this.emit('error', new Error('no ws client or not open'))
    } else if (this._isClosing) {
      this.emit('error', new Error('connection currently closing'))
    } else {
      debug('sending %j', msg)
      this._ws.send(JSON.stringify(msg))
    }
  }
Send a packet to the WS server

@param {*} msg - packet, gets stringified