Platform API Reference
Platform portability layer

Register an IotNetworkReceiveCallback_t.

IotNetworkError_t ( * setReceiveCallback )( void * pConnection,
IotNetworkReceiveCallback_t receiveCallback,
void * pContext );

Sets an IotNetworkReceiveCallback_t to be called asynchronously when data arrives on the network. The network stack should invoke this function "as if" it were the thread routine of a detached thread.

Each network connection may only have one receive callback at any time. IotNetworkInterface_t::close is expected to remove any active receive callbacks.

Parameters
[in]pConnectionThe connection to associate with the receive callback.
[in]receiveCallbackThe function to invoke for incoming network data.
[in]pContextA value to pass as the first parameter to the receive callback.
Returns
Any IotNetworkError_t, as defined by the network stack.
See also
platform_network_function_receivecallback
IotNetworkError_t
IotNetworkError_t
Return codes for network functions.
Definition: iot_network.h:43
IotNetworkReceiveCallback_t
void(* IotNetworkReceiveCallback_t)(void *pConnection, void *pContext)
Provide an asynchronous notification of incoming network data.
Definition: iot_network.h:94