[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LInternetMapper



Overview:

LInternetMapper encapsulates the services of a Domain Name System server (DNS) for remote computers.

Methods :

The methods in this class are:

 

LInternetMapper()  
~LInternetMapper()  
AbortThreadOperation()  
AddressToName()  
GetLocalAddress()  
NameToAddress()  

Data Members:

There are no data members in this class.

 

Operation:

You use an LInternetMapper object to locate the address of another computer on the network. You can convert from a DNS address (like www.metrowerks.com) to an IP address (such as 127.0.0.1) and vice-versa. All of these methods are pure virtual, forcing you to provide your own concrete implementations if you choose to not use LMacTCPInetMapper or LOpenTptInetMapper.

NOTE: For most connection-oriented applications, it is not necessary to use the mapper interface. The LEndpoint interface can accept LInternetDNSAddress objects in its Connect member function, which causes a name lookup to take place automatically.

LInternetMapper is an abstract base class (thus its constructor is declared protected). Use one of the predefined subclasses, such as LMacTCPInetMapper or LOpenTptInetMapper, or use the UNetworkFactory::CreateInternetMapper function to create the appropriate mapper for the system software that's installed on the user's machine.

Source files:

(Networking Classes)

LInternetMapper.h

LInternetMapper.cp

See also:

LEndpoint

LInternetDNSAddress

LMacTCPInetMapper

LOpenTptInetMapper

UNetworkFactory

LInternetMapper()

Purpose:

The copy constructor creates the object. Don't use the defaule constructor.

Access :

Private

Prototype:

LInternetMapper(LInternetMapper&);
Parameters:

None

~LInternetMapper()

Purpose:

The destructor destroys the object.

Access :

Public, Virtual

Prototype:

~LInternetMapper();

AbortThreadOperation()

Purpose:

Aborts a thread operation.

Access :

Pure virtual, Public

Prototype:

virtual void AbortThreadOperation(
   LThread * inThread) = 0;
Parameters:

The parameters for this method are:

 

LThread* inThread The thread.

Return:

None

AddressToName()

Purpose:

Convert an address to a name.

Access :

Pure virtual, Public

Prototype:

virtual void AddressToName(
   UInt32 inHostIP, LStr255& outHostName) = 0;
Parameters:

The parameters for this method are:

 

UInt32 inHostIP The host IP address.
LStr255& outHostName The host name.

Return:

None

GetLocalAddress()

Purpose:

Obtain the local address.

Access :

Pure virtual, Public

Prototype:

virtual LInternetAddress* GetLocalAddress() = 0;
Parameters:

None

Return:

A pointer to the address.

NameToAddress()

Purpose:

Convert a name to an address.

Access :

Pure virtual, Public

Prototype:

UInt32 NameToAddress( 
   ConstStringPtr inHostName ) = 0;
Parameters:

The parameters for this method are:

 

ConstStringPtr inHostName The host name.

Return:

None

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000