Important: The information in this document is obsolete and should not be used for new development.
OTInitInetAddress
Fills in anInetAddress
structure with the data you provide.C INTERFACE
void OTInitInetAddress (InetAddress *addr, InetPort port, InetHost hC++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
addr
- A pointer to an
InetAddress
structure that you allocate. The function fills in this structure.port
- The port number of the address.
host
- The IP address of the host.
DISCUSSION
This function copies thehost
parameter to thefHost
field of the InetAddress, and theport
parameter to thefPort
field.This function also fills in the
fAddressType
field of theInetAddress
structure with the valueAF_INET
. You use theInetAddress
structure when providing a TCP or UDP address to the Open Transport functionsOTConnect
,OTSndURequest
, andOTBind
. You are not required to use theOTInitInetAddress
function when creating anInetAddress
structure; this function is provided for your convenience only.SPECIAL CONSIDERATIONS
TheOTInetInitInetAddress
function cannot block and always runs synchronously. It does not use the services of the DNR.SEE ALSO
TheOTInetStringToHost
function.