code: func (r *Registry) Run(p *network.BzzPeer) error {
  	sp := NewPeer(p.Peer, r)
  	r.setPeer(sp)
  	defer r.deletePeer(sp)
  	defer close(sp.quit)
  	defer sp.close()
  
  	if r.autoRetrieval && !p.LightNode {
  		err := r.Subscribe(p.ID(), NewStream(swarmChunkServerStreamName, "", true), nil, Top)
  		if err != nil {
  			return err
  		}
  	}
  
  	return sp.Run(sp.HandleMsg)
  }
docs: // Run protocol run function