Heartbeat nil.
(ctx context.Context, req *meta.GateHeartbeatRequest)
| 311 | |
| 312 | // Heartbeat nil. |
| 313 | func (g *Gate) Heartbeat(ctx context.Context, req *meta.GateHeartbeatRequest) (*meta.GateHeartbeatResponse, error) { |
| 314 | s, err := g.getSession(ctx) |
| 315 | if err != nil { |
| 316 | return &meta.GateHeartbeatResponse{}, nil |
| 317 | } |
| 318 | |
| 319 | //已经离线就不在处理 |
| 320 | if !s.isOnline() { |
| 321 | return &meta.GateHeartbeatResponse{}, nil |
| 322 | } |
| 323 | |
| 324 | //更新心跳信息 |
| 325 | s.heartbeat() |
| 326 | |
| 327 | return &meta.GateHeartbeatResponse{}, nil |
| 328 | } |
| 329 | |
| 330 | // Push recv Notice server Message, and send Message to client. |
| 331 | func (g *Gate) Push(ctx context.Context, req *meta.GatePushRequest) (*meta.GatePushResponse, error) { |
nothing calls this directly
no test coverage detected