docs: function onMessage(message) {
  
      if (!session._channel) {
        DEBUG("channel connection message received")
        if (message.type != "response") return
        if (message.name != "connect") return
        if (message.from != "server") return
        if (message.id   != "0") return
  
        DEBUG("channel connection message accepted")
  
        session._channel = channel
        cb(null, session)
        return
      }
  
      var agent
  
      if (message.to == "server") {
        if (message.type == "request")     agent = session._ragentServer
      }
  
      else if (message.from == "server") {
        if (message.type == "response")    agent = session._ragentServer
        if (message.type == "event")       agent = session._ragentServer
      }
  
      else if (message.type == "request")  agent = session._agents.get(message.to)
      else if (message.type == "response") agent = session._ragents.get(message.from)
      else if (message.type == "event")    agent = session._ragents.get(message.from)
  
      if (!agent) return
  
      if      (message.type == "request")  agent._onRequest(message)
      else if (message.type == "response") agent._onResponse(message)
      else if (message.type == "event")    agent._onEvent(message)
    }