docs: function Channel_connect(cb) {
    cb = utils.callOnce(cb)
  
    var wsClient = new websocket.client()
  
    wsClient.addListener("connect",       onConnect)
    wsClient.addListener("connectFailed", onConnectFailed)
  
    wsClient.connect(this._url, [this._protocol])
  
    var channel = this
  
    //-----------------------------------
    function onConnect(wsConn) {
      channel._wsConn = wsConn
  
      wsConn.addListener("message", onMessage)
      wsConn.addListener("close",   onClose)
      wsConn.addListener("error",   onError)
  
      cb(null)
    }
  
    //-----------------------------------
    function onConnectFailed(err) {
      cb(err)
    }
  
    //-----------------------------------
    function onMessage(message) {
      if (!channel._wsConn) return
      if (message.type != "utf8") return
  
      message = JSON.parse(message.utf8Data)
      DEBUGMSG("onMessage", utils.JL(message))
  
      channel.emit("message", message)
    }
  
    //-----------------------------------
    function onClose() {
      if (!channel._wsConn) return
  
      channel._wsConn = null
      channel.emit("close")
    }
  
    //-----------------------------------
    function onError(err) {
      channel.emit("error", err)
    }
  }