pub struct PongData {
pub ret_code: Option<i32>,
pub success: Option<bool>,
pub ret_msg: String,
pub conn_id: String,
pub req_id: Option<String>,
pub args: Option<Vec<String>>,
pub data: Option<Vec<String>>,
pub op: String,
}Expand description
Data structure for WebSocket pong responses.
Contains details of a pong response, including connection status and request metadata. Bots use this to confirm WebSocket connection health and manage reconnection logic.
Fields§
§ret_code: Option<i32>The return code for the pong response (optional).
Indicates the status of the pong response (e.g., 0 for success). Bots should check this to verify connection health.
success: Option<bool>Whether the pong response was successful (optional).
If true, the WebSocket connection is healthy. Bots use this to confirm successful ping-pong cycles.
ret_msg: StringA message describing the pong response.
Typically "pong" or an error message. Bots should log this for debugging connection issues.
conn_id: StringThe WebSocket connection ID.
A unique identifier for the WebSocket connection. Bots use this to track specific connections in multi-connection setups.
req_id: Option<String>The request ID for the ping (optional).
The ID of the ping request that triggered this pong. Bots use this to correlate ping-pong pairs.
args: Option<Vec<String>>Additional arguments for the pong response (optional).
Contains any additional data included in the pong, typically empty. Bots can ignore this unless handling custom WebSocket protocols.
data: Option<Vec<String>>Additional data for the pong response (optional).
Contains any extra data included in the pong, typically empty. Bots can ignore this unless handling custom WebSocket protocols.
op: StringThe operation type (e.g., “pong”).
Specifies the WebSocket operation, typically "pong". Bots use this to confirm the response type.