docs: function linkConn(conn,opt){
    var obj = {},
        pbb = new BinaryBuffer(),
        ubb = new BinaryBuffer(),
        packer,unpacker,args;
  
    opt = opt || {};
    obj.instance = opt.ebjs || ebjs;
    obj.counters = opt.counters || {};
    obj.constraints = opt.constraints || {};
    obj.counters.connections = obj.counters.connections || 0;
  
    if(obj.constraints.bytes) obj.constraints.chunkSize = Math.min(
      obj.constraints.chunkSize || Infinity,
      obj.constraints.bytes
    );
  
    obj.constraints.chunkSize = obj.constraints.chunkSize || 15e3;
    obj.connections = {
      in: new Map(),
      out: new Map()
    };
  
    obj.collection = new Detacher();
    obj.nextId = 0;
  
    obj.instance = obj.instance.getChild();
    obj.instance.setPacker(Connection,packerFn,obj);
    obj.instance.setUnpacker(Connection,unpackerFn,obj);
  
    obj.packer = obj.instance.createPacker(pbb);
    obj.unpacker = obj.instance.createUnpacker(ubb);
    packer = obj.instance.createPacker();
    unpacker = obj.instance.createUnpacker();
  
    conn[extBB] = pbb;
    conn.transfer(extTransfer,pbb);
  
    obj.agent = conn.end.lock();
    obj.children = new Setter();
    conn[children] = conn.end[children] = obj.children.getter;
    obj.children.value = 0;
  
    args = [
      obj.unpacker,
      obj.packer,
      unpacker,
      obj.connections,
      obj.constraints,
      obj.counters,
      obj.instance,
      obj.agent,
      obj.children
    ];
  
    obj.collection.add(
      obj.agent.on('message',onMessage,packer),
      obj.agent.once('detached',onceDetached,obj.collection,obj.connections.in,obj.connections.out),
      conn.once('open',tryToForward,ubb,obj.collection,obj.unpacker,obj.agent,args,obj.constraints),
      conn.once('locked',tryToForward,ubb,obj.collection,obj.unpacker,obj.agent,args,obj.constraints),
      walk(processTopUnpacker,[unpacker,obj.agent]),
      walk(processTopPacker,[packer,obj.packer,obj.constraints])
    );
  
    return {
      connection: conn,
      collection: obj.collection,
      packer: obj.packer,
      unpacker: obj.unpacker
    };
  }