# PingFailedReason

public enum PingFailedReason

## Entries

LOST_PONG_LIMIT
Link copied to clipboard
LOST_PONG_LIMIT

丢失的 pong 超限，前台时为 6 个，后台时为 1 个，发送 ping 时会检测触发

SERVER_TIMEOUT
Link copied to clipboard
SERVER_TIMEOUT

服务器时间超限，从后台回到前台时，计算最后一次收到 pong 时间和当前时间差值，超过配置时间即认为离线

FIRST_PING_TIMEOUT
Link copied to clipboard
FIRST_PING_TIMEOUT

应用回到前台会立刻发送 ping 进行探测，探测失败触发

RECEIVE_PONG_TIMEOUT
Link copied to clipboard
RECEIVE_PONG_TIMEOUT

收到 pong 时和队列中第一个 ping 时间做差值，超时触发，情况同 LOST_PONG_LIMIT,触发时机不同

NO_CONNECTED_FIRST_FOREGROUND
Link copied to clipboard
NO_CONNECTED_FIRST_FOREGROUND

应用回到前台，此时不是CONNECTED状态，需要触发重连

## Functions

valueOf
Link copied to clipboard
public static HeartBeatManager.PingFailedReason valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
public static Array<HeartBeatManager.PingFailedReason> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.