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

Method handleGetConnectionCntReq

p2pserver/actor/server/actor.go:138–146  ·  view source on GitHub ↗

connection count handler

(ctx actor.Context, req *GetConnectionCntReq)

Source from the content-addressed store, hash-verified

136
137//connection count handler
138func (this *P2PActor) handleGetConnectionCntReq(ctx actor.Context, req *GetConnectionCntReq) {
139 cnt := this.server.GetConnectionCnt()
140 if ctx.Sender() != nil {
141 resp := &GetConnectionCntRsp{
142 Cnt: cnt,
143 }
144 ctx.Sender().Request(resp, ctx.Self())
145 }
146}
147
148//max peer blockheight handler
149func (this *P2PActor) handleGetMaxPeerBlockHeightReq(ctx actor.Context, req *GetMaxPeerBlockHeightReq) {

Callers 1

ReceiveMethod · 0.95

Calls 2

SenderMethod · 0.80
GetConnectionCntMethod · 0.65

Tested by

no test coverage detected