Resolve network IP addresses and names using Domain Name Servers.
Use the NetLookup class for resolving network names to IP addresses and vice versa.
The NetLookup class consists of the following fields:
Access | Name | Type | Comment | ||||
---|---|---|---|---|---|---|---|
Addresses | STRUCT [] | List of resolved IP addresses. | |||||
A list of the most recently resolved IP addresses can be read from this field. | |||||||
Callback | FUNCTION | This function will be called on the completion of any name or address resolution. | |||||
The function referenced here will receive the results of the most recently resolved name or address. The C/C++ prototype is The Fluid prototype is as follows, with results readable from the HostName and Addresses fields: | |||||||
ClientData | BIGINT | Optional user data storage | |||||
Flags | NLF | Optional flags | |||||
| |||||||
HostName | STRING | Name of the most recently resolved host. | |||||
The name of the most recently resolved host is readable from this field. |
The following actions are currently supported:
Name | Comment | |
---|---|---|
Free | Terminate the object. | |
ERR FreeResource(*Object) This routine may block temporarily if there are unresolved requests awaiting completion in separate threads. |
The following methods are currently supported:
Name | Comment | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BlockingResolveAddress | Resolves an IP address to a host name. | ||||||||||||
ERR nl::BlockingResolveAddress(OBJECTPTR Object, CSTRING Address)
BlockingResolveAddress() performs an IP address resolution, converting an address to an official host name and list of IP addresses. The resolution process requires contact with a DNS server and this will cause the routine to block until a response is received. The results can be read from the HostName field or received via the Callback function. Error Codes
| |||||||||||||
BlockingResolveName | Resolves a domain name to an official host name and a list of IP addresses. | ||||||||||||
ERR nl::BlockingResolveName(OBJECTPTR Object, CSTRING HostName)
BlockingResolveName() performs a domain name resolution, converting a domain name to its official host name and IP addresses. The resolution process requires contact with a DNS server and the function will block until a response is received or a timeout occurs. The results can be read from the Addresses field or received via the Callback function. Error Codes
| |||||||||||||
ResolveAddress | Resolves an IP address to a host name. | ||||||||||||
ERR nl::ResolveAddress(OBJECTPTR Object, CSTRING Address)
ResolveAddress() performs a IP address resolution, converting an address to an official host name and list of IP addresses. The resolution process involves contacting a DNS server. To prevent delays, asynchronous communication is used so that the function can return immediately. The Callback function will be called on completion of the process. If synchronous (blocking) operation is desired then use the BlockingResolveAddress() method. Error Codes
| |||||||||||||
ResolveName | Resolves a domain name to an official host name and a list of IP addresses. | ||||||||||||
ERR nl::ResolveName(OBJECTPTR Object, CSTRING HostName)
ResolveName() performs a domain name resolution, converting a domain name to an official host name and IP addresses. The resolution process involves contacting a DNS server. To prevent delays, asynchronous communication is used so that the function can return immediately. The Callback function will be called on completion of the process. If synchronous (blocking) operation is desired then use the BlockingResolveName() method. Error Codes
|
Options for NetLookup
Name | Description |
---|---|
NLF::NO_CACHE | Contact the name service and do not use the local DNS cache. |
Class Info | |
---|---|
ID | ID_NETLOOKUP |
Category | Network |
Include | modules/netlookup.h |
Version | 1 |