MCPcopy Create free account
hub / github.com/DNAProject/DNA / Send

Method Send

p2pserver/net/netserver/netserver.go:235–241  ·  view source on GitHub ↗

Tx send data buf to peer

(p *peer.Peer, msg types.Message)

Source from the content-addressed store, hash-verified

233
234//Tx send data buf to peer
235func (this *NetServer) Send(p *peer.Peer, msg types.Message) error {
236 if p != nil {
237 return p.Send(msg)
238 }
239 log.Warn("[p2p]send to a invalid peer")
240 return errors.New("[p2p]send to a invalid peer")
241}
242
243//IsPeerEstablished return the establise state of given peer`s id
244func (this *NetServer) IsPeerEstablished(p *peer.Peer) bool {

Callers

nothing calls this directly

Calls 2

WarnFunction · 0.92
SendMethod · 0.65

Tested by

no test coverage detected