MCPcopy Create free account
hub / github.com/DOSNetwork/core / send

Method send

p2p/client.go:206–216  ·  view source on GitHub ↗
(req p2pRequest)

Source from the content-addressed store, hash-verified

204}
205
206func (c *client) send(req p2pRequest) {
207 go func() {
208 select {
209 case <-c.ctx.Done():
210 default:
211 if err := req.sendReq(c.peerSend); err != nil {
212 req.replyResult(nil, errors.Errorf("client send: %w", err))
213 }
214 }
215 }()
216}
217
218func (c *client) encryptPipe(plaintext chan []byte) (out chan []byte) {
219 out = make(chan []byte)

Callers 4

callHandlerMethod · 0.95
TestRequestFunction · 0.95
receiveHandlerMethod · 0.80
listenFunction · 0.80

Calls 2

sendReqMethod · 0.80
replyResultMethod · 0.80

Tested by 2

TestRequestFunction · 0.76
listenFunction · 0.64