From 4d8b89223cbc9f530cc650ab5131c09eab1af258 Mon Sep 17 00:00:00 2001 From: DanyL Date: Thu, 13 Jun 2019 02:01:04 +0300 Subject: Timeout support for SSL connections and better timeout handeling. --- include/libimobiledevice/heartbeat.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/libimobiledevice/heartbeat.h') diff --git a/include/libimobiledevice/heartbeat.h b/include/libimobiledevice/heartbeat.h index 00734b5..1f5344a 100644 --- a/include/libimobiledevice/heartbeat.h +++ b/include/libimobiledevice/heartbeat.h @@ -34,12 +34,14 @@ extern "C" { /** Error Codes */ typedef enum { - HEARTBEAT_E_SUCCESS = 0, - HEARTBEAT_E_INVALID_ARG = -1, - HEARTBEAT_E_PLIST_ERROR = -2, - HEARTBEAT_E_MUX_ERROR = -3, - HEARTBEAT_E_SSL_ERROR = -4, - HEARTBEAT_E_UNKNOWN_ERROR = -256 + HEARTBEAT_E_SUCCESS = 0, + HEARTBEAT_E_INVALID_ARG = -1, + HEARTBEAT_E_PLIST_ERROR = -2, + HEARTBEAT_E_MUX_ERROR = -3, + HEARTBEAT_E_SSL_ERROR = -4, + HEARTBEAT_E_NOT_ENOUGH_DATA = -5, + HEARTBEAT_E_TIMEOUT = -6, + HEARTBEAT_E_UNKNOWN_ERROR = -256 } heartbeat_error_t; typedef struct heartbeat_client_private heartbeat_client_private; @@ -118,6 +120,8 @@ heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); * * @return HEARTBEAT_E_SUCCESS on success, * HEARTBEAT_E_INVALID_ARG when client or *plist is NULL, + * HEARTBEAT_E_NOT_ENOUGH_DATA when not enough data + * received, HEARTBEAT_E_TIMEOUT when the connection times out, * HEARTBEAT_E_PLIST_ERROR when the received data cannot be * converted to a plist, HEARTBEAT_E_MUX_ERROR when a * communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR -- cgit v1.1-32-gdbae