Register two callback functions one for asynchronous socket events and the other one for DNS callback registering function.
The registered callback functions are used to retrieve information in response to the asynchronous socket functions called.
Functions | |
NMI_API void | registerSocketCallback (tpfAppSocketCb socket_cb, tpfAppResolveCb resolve_cb) |
NMI_API void registerSocketCallback | ( | tpfAppSocketCb | pfAppSocketCb, |
tpfAppResolveCb | pfAppResolveCb | ||
) |
[in] | socket_cb | tpfAppSocketCb Assignment of callback function to the global callback tpfAppSocketCb gpfAppSocketCb. Delivers socket messages to the host application. In response to the asynchronous function calls, such as bind listen accept connect |
[in] | resolve_cb | tpfAppResolveCb Assignment of callback function to the global callback tpfAppResolveCb gpfAppResolveCb. Used for DNS resolving. The DNS resolving technique is determined by the application registering the callback. NULL is assigned when, DNS resolution is not required. |
This example demonstrates the use of the registerSocketCallback to register a socket callback function with DNS resolution CB set to null for a simple UDP server example.
References gpfAppResolveCb, and gpfAppSocketCb.
Referenced by main(), NMI_GrowlInit(), and wifi_ap_provision().