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

Function NewP2pRequest

p2p/request.go:30–34  ·  view source on GitHub ↗
(ctx context.Context, rType int, id []byte, addr string, msg proto.Message, nonce uint64)

Source from the content-addressed store, hash-verified

28}
29
30func NewP2pRequest(ctx context.Context, rType int, id []byte, addr string, msg proto.Message, nonce uint64) (req *p2pRequest) {
31 rctx, cancel := context.WithCancel(ctx)
32 req = &p2pRequest{ctx: rctx, cancel: cancel, id: id, msg: msg, rType: rType, nonce: nonce, reply: make(chan p2pResult)}
33 return
34}
35func (r *p2pRequest) sendReq(ch chan p2pRequest) (err error) {
36 select {
37 case ch <- *r:

Callers 2

RequestMethod · 0.85
ReplyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected