LInternetAddress is a PowerPlant class that is used for wrapping the IP addresses that are used internally by the Internet to describe another computer's location.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
DNS names (like "ftp.metrowerks.com") must be mapped to IP addresses (127.0.0.1) before connections are established. This object will handle such conversions automatically.
Source files:
Purpose:
The constructor creates the object.
Access :
Prototype:
LInternetAddress(
UInt32 inHostAddress,
UInt16 inHostPort );
LInternetAddress(
ConstStringPtr inHostAddress,
UInt16 inHostPort,
Boolean inLookupNow );
LInternetAddress(
UInt16 inHostPort );
LInternetAddress(
const LInternetAddress& inOriginal );Parameters:
The parameters for this method are:
Purpose:
The destructor destroys the LInternetAddress object.
Access :
Prototype:
virtual ~LInternetAddress();
Purpose:
Create a new copy of the address using the new operator from this one.
Access :
Prototype:
virtual LInternetAddress* Clone();Parameters:
Return:
A new copy of the internet address.
Purpose:
Retrieve the DNS address string.
Access :
Prototype:
virtual StringPtr GetDNSAddress(
Str255 outDescriptor); The parameters for this method are:
| Str255 | outDescriptor | The address string. |
Return:
Purpose:
Return the name of the specified host (and port number if available) Use GetDNSAddress() if you don't care if we have tried to do a DNS lookup.
Access :
Prototype:
StringPtr GetDNSDescriptor( Str255 outDescriptor, Boolean withPort);Parameters:
The parameters for this method are:
| Str255 | outDescriptor | The address string. |
| Boolean | withPort | Whether to add the port to the string or not. |
Return:
Purpose:
Returns the value of mHostPort.
Access :
Prototype:
virtual UInt16 GetHostPort();Parameters:
Return:
The value of mHostPort.
Purpose:
Return the 32-bit IP address of the host.
Access :
Prototype:
virtual UInt32 GetIPAddress();Parameters:
Return:
Purpose:
Return the 32-bit IP address of the host as well as dotted decimal format.
Access :
Prototype:
virtual UInt32 GetIPAddress(Str255 outDescriptor);Parameters:
The parameters for this method are:
| Str255 | outDescriptor | The address string. |
Return:
Purpose:
Convert the IP address to dotted decimal format and return this string. If a port number is specified, optionally return that at the end of the string.
Access :
Prototype:
virtual StringPtr GetIPDescriptor(
Str255 outDescriptor, Boolean withPort); The parameters for this method are:
| Str255 | outDescriptor | The address string. |
| Boolean | withPort | Add the port to the string or not. |
Return:
Purpose:
Create mapper and lookup address from DNS name.
Access :
Prototype:
void InternalLookupAddress();Parameters:
Return:
Purpose:
Create mapper and lookup name from IP Address.
Access :
Prototype:
void InternalLookupName();Parameters:
Return:
Purpose:
Create an Open Transport (OT) DNS address.
Access :
Prototype:
virtual void MakeOTDNSAddress( TNetbuf& outAddress );Parameters:
The parameters for this method are:
| TNetbuf& | outAddress | The OT address. |
Return:
Purpose:
Make an Open Transport (OT) IP address.
Access :
Prototype:
virtual void MakeOTIPAddress(
TNetbuf& outAddress ); The parameters for this method are:
| TNetbuf& | outAddress | The OT address. |
Return:
Purpose:
Set the value of the mDNSAddress data member.
Access :
Prototype:
virtual void SetDNSAddress(
ConstStringPtr inHostAddress); The parameters for this method are:
| ConstStringPtr | inHostAddress | The DNS address. |
Return:
Purpose:
Set the value of the mHostPort data member.
Access :
Prototype:
virtual void SetHostPort(UInt16 inHostPort);Parameters:
The parameters for this method are:
| UInt16 | inHostPort | The host port. |
Return:
Purpose:
Set the value of the mIPAddress data member.
Access :
Prototype:
virtual void SetIPAddress(UInt32 inHostAddress);Parameters:
The parameters for this method are:
| UInt32 | inHostAddress | The IP address. |
Return:
Purpose:
Access :
Prototype:
UInt32 mIPAddress;
Purpose:
Access :
Prototype:
LStr255 mDNSAddress;
Purpose:
Access :
Prototype:
UInt16 mHostPort;