RSP_serverSendKeepAlive

Name

RSP_serverSendKeepAlive -- Sends a keep-alive packet to a persistently connected RSPD.

Synopsis

int RSP_serverSendKeepAlive(RSP_server* server);

Description

This function sends a small keep-alive packet to an established persistent connection. This means that the persistent parameter of RSP_newServer must have been set to 1, and a connection must have already been made with RSP_serverConnect. If either is not true, this function will fail.

If persistent connections are desired but the time between gathering new data may be large, this function can be used to guarantee that the connection is still active. If the keep-alive packet cannot be sent successfully, this function will return RSP_LOST_CONNECTION.

Returns

This function returns 0 if no error occurred, and -1 otherwise.

Error Conditions

If an error occurs with this function, -1 is returned and rsp_error is set appropriately. Possible error values are: