135 const uint8_t* payload,
142 const uint8_t* payload,
void * golioth_sys_thread_t
void(* golioth_get_cb_fn)(golioth_client_t client, const golioth_response_t *response, const char *path, const uint8_t *payload, size_t payload_size, void *arg)
golioth_client_t golioth_client_create(const golioth_client_config_t *config)
golioth_status_t golioth_client_stop(golioth_client_t client)
bool golioth_client_is_connected(golioth_client_t client)
void(* golioth_client_event_cb_fn)(golioth_client_t client, golioth_client_event_t event, void *arg)
void golioth_client_destroy(golioth_client_t client)
golioth_status_t golioth_client_start(golioth_client_t client)
bool golioth_client_has_allocation_leaks(void)
bool golioth_client_is_running(golioth_client_t client)
bool golioth_client_wait_for_connect(golioth_client_t client, int timeout_ms)
void(* golioth_get_block_cb_fn)(golioth_client_t client, const golioth_response_t *response, const char *path, const uint8_t *payload, size_t payload_size, bool is_last, void *arg)
golioth_sys_thread_t golioth_client_get_thread(golioth_client_t client)
void * golioth_client_t
Opaque handle to the Golioth client.
golioth_tls_auth_type_t
TLS authentication type.
void golioth_client_register_event_callback(golioth_client_t client, golioth_client_event_cb_fn callback, void *arg)
golioth_client_event_t
Golioth client events.
uint32_t golioth_client_num_items_in_request_queue(golioth_client_t client)
void golioth_client_set_packet_loss_percent(uint8_t percent)
void(* golioth_set_cb_fn)(golioth_client_t client, const golioth_response_t *response, const char *path, void *arg)
@ GOLIOTH_TLS_AUTH_TYPE_PKI
Authenticate with PKI certificates (CA cert, public client cert, private client key)
@ GOLIOTH_TLS_AUTH_TYPE_PSK
Authenticate with pre-shared key (psk-id and psk)
@ GOLIOTH_CLIENT_EVENT_CONNECTED
Client was previously not connected, and is now connected.
@ GOLIOTH_CLIENT_EVENT_DISCONNECTED
Client was previously connected, and is now disconnected.
Golioth client configuration, passed into golioth_client_create.
golioth_tls_credentials_t credentials
const uint8_t * public_cert
PEM Public client cert.
const uint8_t * private_key
PEM Private client key.
const char * psk
Pre-shared key, secret password.
Response status and CoAP class/code.
uint8_t status_code
the 03 in 4.03
uint8_t status_class
the 2 in 2.XX
TLS Authentication Credentials.
golioth_pki_credentials_t pki
golioth_tls_auth_type_t auth_type
golioth_psk_credentials_t psk