28 #ifndef IOT_NETWORK_H_ 29 #define IOT_NETWORK_H_ 32 #include "iot_config.h" 45 typedef enum IotNetworkError
58 typedef enum IotNetworkCloseReason
221 const uint8_t * pMessage,
222 size_t messageLength );
244 size_t bytesRequested );
296 typedef struct IotNetworkInterface
uint16_t port
Server port in host-order.
Definition: iot_network.h:363
const char * pPrivateKey
String representing the client certificate's private key.
Definition: iot_network.h:405
IotNetworkError_t(* IotNetworkCreate_t)(IotNetworkServerInfo_t pServerInfo, IotNetworkCredentials_t pCredentialInfo, IotNetworkConnection_t *pConnection)
Create a new network connection.
Definition: iot_network.h:193
void(* IotNetworkCloseCallback_t)(IotNetworkConnection_t pConnection, IotNetworkCloseReason_t reason, void *pContext)
Provide an asynchronous notification of network closing.
Definition: iot_network.h:174
const char * pHostName
Server host name. Must be NULL-terminated.
Definition: iot_network.h:362
size_t(* IotNetworkSend_t)(IotNetworkConnection_t pConnection, const uint8_t *pMessage, size_t messageLength)
Send data over a return connection.
Definition: iot_network.h:265
Represents the functions of a network stack.
Definition: iot_network.h:341
const char * pAlpnProtos
Set this to a non-NULL value to use ALPN.
Definition: iot_network.h:385
size_t(* IotNetworkReceive_t)(IotNetworkConnection_t pConnection, uint8_t *pBuffer, size_t bytesRequested)
Block and wait for incoming network data.
Definition: iot_network.h:287
IotNetworkError_t(* IotNetworkDestroy_t)(IotNetworkConnection_t pConnection)
Free resources used by a network connection.
Definition: iot_network.h:331
IotNetworkError_t(* IotNetworkSetReceiveCallback_t)(IotNetworkConnection_t pConnection, IotNetworkReceiveCallback_t receiveCallback, void *pContext)
Register an IotNetworkReceiveCallback_t.
Definition: iot_network.h:219
const char * pPassword
String representing the password for MQTT.
Definition: iot_network.h:409
size_t privateKeySize
Size associated with IotNetworkCredentials.pPrivateKey.
Definition: iot_network.h:406
Information on the remote server for connection setup.
Definition: iot_network.h:360
size_t passwordSize
Size associated with IotNetworkCredentials.pPassword.
Definition: iot_network.h:410
bool disableSni
Disable server name indication (SNI) for a TLS session.
Definition: iot_network.h:399
const char * pClientCert
String representing the client certificate.
Definition: iot_network.h:403
size_t rootCaSize
Size associated with IotNetworkCredentials.pRootCa.
Definition: iot_network.h:402
Contains the credentials necessary for connection setup.
Definition: iot_network.h:374
const char * pRootCa
String representing a trusted server root certificate.
Definition: iot_network.h:401
void(* IotNetworkReceiveCallback_t)(IotNetworkConnection_t pConnection, void *pContext)
Provide an asynchronous notification of incoming network data.
Definition: iot_network.h:158
IotNetworkError_t(* IotNetworkClose_t)(IotNetworkConnection_t pConnection)
Close a network connection.
Definition: iot_network.h:312
size_t clientCertSize
Size associated with IotNetworkCredentials.pClientCert.
Definition: iot_network.h:404
size_t userNameSize
Size associated with IotNetworkCredentials.pUserName.
Definition: iot_network.h:408
size_t maxFragmentLength
Set this to a non-zero value to use TLS max fragment length negotiation (TLS MFLN).
Definition: iot_network.h:394
const char * pUserName
String representing the username for MQTT.
Definition: iot_network.h:407
IotNetworkError_t(* IotNetworkSetCloseCallback_t)(IotNetworkConnection_t pConnection, IotNetworkCloseCallback_t closeCallback, void *pContext)
Register an IotNetworkReceiveCallback_t.
Definition: iot_network.h:245