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

Method Send

p2pserver/peer/peer.go:278–283  ·  view source on GitHub ↗

Send transfer buffer by sync or cons link

(msg types.Message)

Source from the content-addressed store, hash-verified

276
277//Send transfer buffer by sync or cons link
278func (this *Peer) Send(msg types.Message) error {
279 sink := comm.NewZeroCopySink(nil)
280 types.WriteMessage(sink, msg)
281
282 return this.SendRaw(msg.CmdType(), sink.Bytes())
283}
284
285//SetHttpInfoState set peer`s httpinfo state
286func (this *Peer) SetHttpInfoState(httpInfo bool) {

Callers 1

ConnectMethod · 0.95

Calls 4

SendRawMethod · 0.95
BytesMethod · 0.95
WriteMessageFunction · 0.92
CmdTypeMethod · 0.65

Tested by

no test coverage detected