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

Method SendRaw

p2pserver/peer/peer.go:203–208  ·  view source on GitHub ↗

SendTo call sync link to send buffer

(msgType string, msgPayload []byte)

Source from the content-addressed store, hash-verified

201
202//SendTo call sync link to send buffer
203func (this *Peer) SendRaw(msgType string, msgPayload []byte) error {
204 if this.Link != nil && this.Link.Valid() {
205 return this.Link.SendRaw(msgPayload)
206 }
207 return errors.New("[p2p]sync link invalid")
208}
209
210//Close halt sync connection
211func (this *Peer) Close() {

Callers 2

SendMethod · 0.95
BroadcastMethod · 0.45

Calls 1

ValidMethod · 0.45

Tested by

no test coverage detected