OneNet_IoT_demo for ASC platform
Dependencies: Common_lib ESP8266 EdpKit_lib cJSON_lib driver_mbed_HP20x driver_mbed_TH02 wifi_example
Fork of mbed-os-example-esp8266 by
Diff: esp8266-driver/ESP8266Interface.h
- Revision:
- 1:b4a718e62e0b
- Parent:
- 0:b887535f68bf
diff -r b887535f68bf -r b4a718e62e0b esp8266-driver/ESP8266Interface.h --- a/esp8266-driver/ESP8266Interface.h Thu Jan 12 20:21:45 2017 +0000 +++ b/esp8266-driver/ESP8266Interface.h Thu Jan 12 22:05:15 2017 +0000 @@ -124,6 +124,29 @@ */ virtual int scan(WiFiAccessPoint *res, unsigned count); + /** Translates a hostname to an IP address with specific version + * + * The hostname may be either a domain name or an IP address. If the + * hostname is an IP address, no network transactions will be performed. + * + * If no stack-specific DNS resolution is provided, the hostname + * will be resolve using a UDP socket on the stack. + * + * @param address Destination for the host SocketAddress + * @param host Hostname to resolve + * @param version IP version of address to resolve, NSAPI_UNSPEC indicates + * version is chosen by the stack (defaults to NSAPI_UNSPEC) + * @return 0 on success, negative error code on failure + */ + using NetworkInterface::gethostbyname; + + /** Add a domain name server to list of servers to query + * + * @param addr Destination for the host address + * @return 0 on success, negative error code on failure + */ + using NetworkInterface::add_dns_server; + protected: /** Open a socket * @param handle Handle in which to store new socket