Delta / NNN50_WIFI_API

Dependents:   NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more

Embed: (wiki syntax)

« Back to documentation index

gethostbyname

gethostbyname
[Function]

Asynchronous DNS resolving function. More...

Functions

NMI_API sint8 gethostbyname (uint8 *pcHostName)

Detailed Description

Asynchronous DNS resolving function.

This function use DNS to resolve a domain name into the corresponding IP address. A call to this function will cause a DNS request to be sent and the response will be delivered to the DNS callback function registered using registerSocketCallback()


Function Documentation

NMI_API sint8 gethostbyname ( uint8 pcHostName )
Parameters:
[in]pcHostNameNULL terminated string containing the domain name for the remote host. Its size must not exceed [HOSTNAME_MAX_SIZE](HOSTNAME_MAX_SIZE).
See also:
registerSocketCallback
Warning:
Successful completion of a call to gethostbyname() does not guarantee success of the DNS request, a negative return value indicates only locally-detected errors
Returns:
  • [SOCK_ERR_NO_ERROR](SOCK_ERR_NO_ERROR)
  • [SOCK_ERR_INVALID_ARG](SOCK_ERR_INVALID_ARG)