Sternum Linux SDK
|
Defines the SDK's transmission callbacks available for user implementation. More...
#include <stddef.h>
Go to the source code of this file.
Data structures | |
struct | sternum_transmission_callbacks_t |
Struct to hold the transmission callbacks. More... | |
Typedefs | |
typedef void(* | sternum_transmission_started_callback_t) (void) |
Typedef for the transmission started callback function. More... | |
typedef void(* | sternum_transmission_finished_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the transmission finished callback function. More... | |
typedef void(* | sternum_packets_lost_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the packets lost callback function. More... | |
typedef void(* | sternum_error_callback_t) (int error_code, const char *error_message) |
Typedef for the error callback function. More... | |
Defines the SDK's transmission callbacks available for user implementation.
typedef void(* sternum_error_callback_t) (int error_code, const char *error_message) |
Typedef for the error callback function.
This function will be implemented by the user and registered with the SDK. It will be invoked when an error occurs during the transmission process.
error_code | STERNUM_CODE_FILE_CACHE_ACCESS_FAILURE 100 STERNUM_CODE_FILE_CACHE_RECOVERY_CLEAR 101 |
error_message | A null-terminated string containing a description of the error. |
typedef void(* sternum_packets_lost_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the packets lost callback function.
This function will be implemented by the user and registered with the SDK.
Packets are considered lost when they fail to be stored in cache and thus not transmitted, or when the transmission is impossible permanently. Transmission failure itself is not considered packet lost because it will be retried until success.
packets_lost_count | The number of packets that were lost. |
bytes_count | The number of bytes that were lost. |
typedef void(* sternum_transmission_finished_callback_t) (size_t packets_count, size_t bytes_count) |
Typedef for the transmission finished callback function.
This function will be implemented by the user and registered with the SDK. It will be invoked after the data transmission finishes.
packets_count | The number of packets that were successfully transmitted. |
bytes_count | The number of bytes that were successfully transmitted. |
typedef void(* sternum_transmission_started_callback_t) (void) |
Typedef for the transmission started callback function.
This function will be implemented by the user and registered with the SDK. It will be invoked before the data transmission starts.