MCPcopy
hub / github.com/canopy-network/canopy / Stop

Method Stop

p2p/set.go:284–291  ·  view source on GitHub ↗

Stop() stops the entire peer set

()

Source from the content-addressed store, hash-verified

282
283// Stop() stops the entire peer set
284func (ps *PeerSet) Stop() {
285 defer lib.TimeTrack(ps.logger, time.Now(), time.Second)
286 unlock := rlockWithTrace("peerset", &ps.mux, ps.logger)
287 defer unlock()
288 for _, p := range ps.m {
289 p.conn.Stop()
290 }
291}
292
293// send() sends a message to a specific peer object
294func (ps *PeerSet) send(peer *Peer, topic lib.Topic, bz []byte) lib.ErrorI {

Callers

nothing calls this directly

Calls 2

TimeTrackFunction · 0.92
rlockWithTraceFunction · 0.85

Tested by

no test coverage detected