Heartbeat

Example:heartbeat

You can set automatic heartbeat ping/pong to keep connection alive.

Rpcx servers can handle heartbeat requests automatically and you don't need to do more configurations.

Clients should enable heartbeat option in Client option and set the heartbeat interval:

  1. option := client.DefaultOption
  2. option.Heartbeat = true
  3. option.HeartbeatInterval = time.Second

By smallnest updated 2018-03-27 11:12:10

原文:

http://doc.rpcx.site/part3/heartbeat.html