Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more
Asynchronous Events
[DataTypes]
Specific Enumeration used for asynchronous operations. More...
Data Structures | |
| struct | tstrSocketBindMsg |
| Socket bind status. More... | |
| struct | tstrSocketListenMsg |
| Socket listen status. More... | |
| struct | tstrSocketAcceptMsg |
| Socket accept status. More... | |
| struct | tstrSocketConnectMsg |
| Socket connect status. More... | |
| struct | tstrSocketRecvMsg |
| Socket recv status. More... | |
Typedefs | |
| typedef void(* | tpfAppSocketCb )(SOCKET sock, uint8 u8Msg, void *pvMsg) |
| The main socket application callback function. Applications register their main socket application callback through this function by calling registerSocketCallback. In response to events received, the following callback function is called to handle the corresponding asynchronous function called. Example: bind, connect,...etc. | |
| typedef void(* | tpfAppResolveCb )(uint8 *pu8DomainName, uint32 u32ServerIP) |
| DNS resolution callback function. Applications requiring DNS resolution should register their callback through this function by calling registerSocketCallback. The following callback is triggered in response to asynchronous call to the gethostbyname function (DNS Resolution callback). | |
| typedef void(* | tpfPingCb )(uint32 u32IPAddr, uint32 u32RTT, uint8 u8ErrorCode) |
| PING Callback. | |
Enumerations | |
| enum | tenuSocketCallbackMsgType { SOCKET_MSG_BIND = 1, SOCKET_MSG_LISTEN, SOCKET_MSG_DNS_RESOLVE, SOCKET_MSG_ACCEPT, SOCKET_MSG_CONNECT, SOCKET_MSG_RECV, SOCKET_MSG_SEND, SOCKET_MSG_SENDTO, SOCKET_MSG_RECVFROM } |
Asynchronous APIs, make use of callback functions, in-order to return back the results once the corresponding socket operation is completed. Hence resuming the normal execution of the application code while the socket operation returns the results. Callback functions expect event messages to be passed in, in-order to identify the operation they're returning the results for. The following enum identifies the type of events that are received in the callback function. More... | |
Detailed Description
Specific Enumeration used for asynchronous operations.
Typedef Documentation
DNS resolution callback function. Applications requiring DNS resolution should register their callback through this function by calling registerSocketCallback. The following callback is triggered in response to asynchronous call to the gethostbyname function (DNS Resolution callback).
- Parameters:
-
[in] pu8DomainName Domain name of the host. [in] u32ServerIP Server IPv4 address encoded in NW byte order format. If it is Zero, then the DNS resolution failed.
The main socket application callback function. Applications register their main socket application callback through this function by calling registerSocketCallback. In response to events received, the following callback function is called to handle the corresponding asynchronous function called. Example: bind, connect,...etc.
- Parameters:
-
[in] sock Socket ID for the callback.
The socket callback function is called whenever a new event is recived in response to socket operations.
- Parameters:
-
[in] u8Msg Socket event type. Possible values are: [in] pvMsg Pointer to message structure. Existing types are:
PING Callback.
The function delivers the ping statistics for the sent ping triggered by calling m2m_ping_req.
- Parameters:
-
[in] u32IPAddr Destination IP. [in] u32RTT Round Trip Time. [in] u8ErrorCode Ping error code. It may be one of: - PING_ERR_SUCCESS
- PING_ERR_DEST_UNREACH
- PING_ERR_TIMEOUT
Enumeration Type Documentation
Asynchronous APIs, make use of callback functions, in-order to return back the results once the corresponding socket operation is completed. Hence resuming the normal execution of the application code while the socket operation returns the results. Callback functions expect event messages to be passed in, in-order to identify the operation they're returning the results for. The following enum identifies the type of events that are received in the callback function.
Application Use: In order for application developers to handle the pending events from the network controller through the callback functions. A function call must be made to the function m2m_wifi_handle_events at least once for each socket operation.
- See also:
- bind listen accept connect send recv
- Enumerator:
Generated on Wed Jul 13 2022 16:32:38 by
1.7.2