Skip to content

websocket heartbeat keepalive

After a successful login, you need to report the heartbeat data to the service periodically. It is recommended that the heartbeat data be reported every 30 seconds. The server will reply with this message

websocket Header field

Request message method: Request Response

Request message type: 1001

Reply message type: 5001

Push message definition

fieldtypedesc
hdrobjectHeaders, Table 1 in login :websocket headers

Example

Request message

json
{
    "hdr":{
        "message":"",
        "msgType":1001, //View the message type definition
        "reqSN":1,
        "respSN":0  
    }
}
{
    "hdr":{
        "message":"",
        "msgType":1001, //View the message type definition
        "reqSN":1,
        "respSN":0  
    }
}

Response message

json
{
    "hdr":{
        "message":"",
        "msgType":5001, //View the message type definition
        "reqSN":1,
        "respSN":1
    }
}
{
    "hdr":{
        "message":"",
        "msgType":5001, //View the message type definition
        "reqSN":1,
        "respSN":1
    }
}