Helium
|
Contains functions for dealing with the client convenience struct. More...
#include <he.h>
Go to the source code of this file.
Macros | |
#define | HE_WOLF_TIMEOUT_MULTIPLIER 100 |
#define | HE_WOLF_RENEGOTIATION_TIMEOUT_MULTIPLIER 1000 |
Functions | |
he_client_t * | he_client_create (void) |
Creates a Helium client. More... | |
he_return_code_t | he_client_destroy (he_client_t *client) |
Releases all memory allocate by Helium including for the crypto layer. More... | |
he_return_code_t | he_client_connect (he_client_t *client) |
Tries to establish a connection with a Helium server. More... | |
he_return_code_t | he_client_disconnect (he_client_t *client) |
Try to cleanly disconnect from the remote server. More... | |
he_return_code_t | he_client_is_config_valid (he_client_t *client) |
Checks whether the client context has the basic configuration to allow Helium to connect. More... | |
Contains functions for dealing with the client convenience struct.
he_return_code_t he_client_connect | ( | he_client_t * | client | ) |
Tries to establish a connection with a Helium server.
client | A pointer to a valid client context |
This function has a lot of return codes as it is where Helium tries to apply and configure the crypto engine. All of the return codes except for HE_SUCCESS are effectively fatal errors. Trying to call he_client_connect again without changing the configuration is unlikely to succeed.
he_client_t* he_client_create | ( | void | ) |
Creates a Helium client.
This function must be called to create the initial Helium context for use with other functions
he_return_code_t he_client_destroy | ( | he_client_t * | client | ) |
Releases all memory allocate by Helium including for the crypto layer.
client | A pointer to a valid client context |
It will first remove all of the callbacks which means no Helium callbacks will be triggered after calling this function. It is thus an error to call any Helium functions on this context after it has been destroyed.
he_return_code_t he_client_disconnect | ( | he_client_t * | client | ) |
Try to cleanly disconnect from the remote server.
client | A pointer to a valid client context |
he_return_code_t he_client_is_config_valid | ( | he_client_t * | client | ) |
Checks whether the client context has the basic configuration to allow Helium to connect.
client | A pointer to a valid client context |
he_client_connect
because that function will call this function before attempting to connect.