docs: function piper(to, cbPiper)
    {
      if(pipes[to]) return cbPiper(pipes[to]);
  
      // make a new pipe for this peering
      var pipe = pipes[to] = new Pipe('peer');
      pipe.to = to;
      pipe.path = {type:'peer',hn:to};
  
      // handle any peer delivery through the router
      function peer_send(packet, link, cbSend)
      {
        var router = mesh.index[to];
        if(!router) return cbSend('cannot peer to an unknown router: '+pipe.to);
        if(!router.x) return cbSend('cannot peer yet via this router: '+pipe.to);
        if(!link) return cbSend('requires link');
  
        // no packet means try to send our keys
        if(!packet)
        {
          Object.keys(mesh.keys).forEach(function(csid){
            if(link.csid && link.csid != csid) return; // if we know the csid, only send that key
            var json = {type:'peer',peer:link.hashname,c:router.x.cid()};
            var body = lob.encode(hashname.intermediates(mesh.keys), hashname.key(csid, mesh.keys));
            var attach = lob.encode({type:'link', csid:csid}, body);
            log.debug('sending peer key to',router.hashname,json,csid);
            router.x.send({json:json,body:attach});
          });
          return;
        }
  
        // if it's an encrypted channel packet, pass through direct to router
        if(packet.head.length == 0) return router.x.sending(packet);
  
        // otherwise we're always creating a new peer channel to carry the request
        var json = {type:'peer',peer:link.hashname,c:router.x.cid()};
        var body = lob.encode(packet);
        log.debug('sending peer handshake to',router.hashname,json,body);
        router.x.send({json:json,body:body});
        cbSend();
      }
  
  
      pipe.on('send', function(context,a1, a2, a3, a4){
        peer_send.call(context,a1,a2,a3,a4)
      })
  
      cbPiper(pipe);
    }