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

Method handleGetTimeReq

p2pserver/actor/server/actor.go:182–190  ·  view source on GitHub ↗

timestamp handler

(ctx actor.Context, req *GetTimeReq)

Source from the content-addressed store, hash-verified

180
181//timestamp handler
182func (this *P2PActor) handleGetTimeReq(ctx actor.Context, req *GetTimeReq) {
183 time := this.server.GetTime()
184 if ctx.Sender() != nil {
185 resp := &GetTimeRsp{
186 Time: time,
187 }
188 ctx.Sender().Request(resp, ctx.Self())
189 }
190}
191
192//nbr peer`s address handler
193func (this *P2PActor) handleGetNeighborAddrsReq(ctx actor.Context, req *GetNeighborAddrsReq) {

Callers 1

ReceiveMethod · 0.95

Calls 2

SenderMethod · 0.80
GetTimeMethod · 0.65

Tested by

no test coverage detected