Embedded TCP/IP stack  4.7.0

◆ fnet_sntp_init()

fnet_return_t fnet_sntp_init ( fnet_sntp_params_t params)

Initializes the SNTP client service and starts the time resolving.

Parameters
paramsInitialization parameters.
Returns
This function returns:
See also
fnet_sntp_params_t, fnet_sntp_callback_resolved_t, fnet_sntp_release()

This function initializes the SNTP client service and starts the time resolving. It allocates all needed resources and registers the SNTP service in the polling list.
After the initialization, the user application should call the main polling function fnet_service_poll() periodically to run the SNTP service routine in the background.
The resolved timestamp will be passed to the fnet_sntp_callback_resolved_t callback function, which is set in params.
The SNTP service is released automatically as soon as the resolving is finished or a timeout is occurred. The timeout equals to FNET_CFG_SNTP_RETRANSMISSION_TIMEOUT * FNET_CFG_SNTP_RETRANSMISSION_MAX seconds.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net