func (router *Router) OnGossip(update []byte) (GossipData, error) {
	_, newUpdate, err := router.applyTopologyUpdate(update)
	if err != nil || len(newUpdate) == 0 {
		return nil, err
	}
	return &topologyGossipData{peers: router.Peers, update: newUpdate}, nil
}
func (router *Router) OnGossip(update []byte) (GossipData, error) {
	_, newUpdate, err := router.applyTopologyUpdate(update)
	if err != nil || len(newUpdate) == 0 {
		return nil, err
	}
	return &topologyGossipData{peers: router.Peers, update: newUpdate}, nil
}
func ( router * Router ) OnGossip ( update [ ] byte ) ( GossipData , error ) { _ , newUpdate , err := router . applyTopologyUpdate ( update ) if err != nil || len ( newUpdate ) == 0 { return nil , err } return & topologyGossipData { peers : router . Peers , update : newUpdate } , nil }
// OnGossip receives broadcasts of TopologyGossipData.
// It returns an "improved" version of the received update.
// See peers.ApplyUpdate.
OnGossip receives broadcasts of TopologyGossipData . It returns an improved version of the received update . See peers . ApplyUpdate .