timestamp handler
(ctx actor.Context, req *GetTimeReq)
| 180 | |
| 181 | //timestamp handler |
| 182 | func (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 |
| 193 | func (this *P2PActor) handleGetNeighborAddrsReq(ctx actor.Context, req *GetNeighborAddrsReq) { |