Important: The information in this document is obsolete and should not be used for new development.
OTInitDNSAddress
Fills in aDNSAddress
structure with your data.C INTERFACE
size_t OTInitDNSAddress (DNSAddress *addr, char *str);C++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
addr
- A pointer to a
DNSAddress
structure that you allocate. The function fills in thefAddressType
field of theDNSAddress
structure with the valueAF_DNS
and fills in the structure'sfName
field with the address string you specify.str
- A pointer to a domain name string.
- function result
- The function returns the size of the resulting
DNSAddress
structure as an unsigned integer.DISCUSSION
You can use theDNSAddress
structure to provide an address when you use a UDP or TCP endpoint. If you do so, the domain name resolver resolves the address for you automatically.SPECIAL CONSIDERATIONS
TheOTInetDNSAddress
function cannot block and always runs synchronously. It does not use the services of the DNR.