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

 

LEndpoint



Overview:

LEndpoint is a PowerPlant class that forms the basis for networking. Most of the methods are pure virtual, which means that you need to supply implementations if you inherit from this class.

Methods :

The methods in this class are:

 

LEndpoint()  
~LEndpoint()  
AbortThreadOperation()  
AckSends()  
Bind()  
DontAckSends()  
DontQueueSends()  
GetLocalAddress()  
GetState()  
IsAckingSends()  
IsQueuingSends()  
QueueSends()  
Unbind()  
 

Data Members:

The data members in this class are:

 

mQueueSends  
 

Operation:

This class encapsulates the idea of a "network endpoint," or one side of a two-way communication link. The endpoint is the object that is used to send or receive data over the network.

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

Source files:

(Networking Classes)

LEndpoint.h

LEndpoint.cp

See also:

LBroadcaster

LMacTCPTCPEndpoint

LOpenTptTCPEndpoint

UNetworkFactory

LEndpoint()

Purpose:

The constructor creates the object.

Access :

Public

Prototype:

LEndpoint();
Parameters:

None

~LEndpoint()

Purpose:

The destructor destroys the object.

Access :

Virtual, Public

Prototype:

virtual ~LEndpoint();
Parameters:

None

AbortThreadOperation()

Purpose:

This method must be implemented by your class since it is pure virtual. Abort a thread operation.

Access :

Pure virtual, Public

Prototype:

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

The parameter for this methods is:

 

LThread*  
inThread  
The pointer to the thread.  

Return:

None

AckSends()

Purpose:

Enable the acknowledgement of sent data for the endpoint.

Access :

Pure virtual, Public

Prototype:

virtual void				AckSends() = 0;
Parameters:

None

Return:

None

Bind()

Purpose:

Reserve a TCP port for the connection.

Access :

Pure virtual, Public

Prototype:

virtual void				Bind(

	LInternetAddress& inLocalAddress,

	UInt32 inListenQueueSize = 0,

	Boolean inReusePort = true) = 0;
Parameters:

The parameters for this method are:

 

LInternetAddress& inLocalAddress The local address.
UInt32 inListenQueueSize The listen queue size in bytes, the default is 0.
Boolean inReusePort Whether to reuse the port or not, the default is 0.

Return:

None

DontAckSends()

Purpose:

Disable the acknowledgement of sent data for the endpoint.

Access :

Pure virtual, Public

Prototype:

virtual void				DontAckSends() = 0;
Parameters:

None

Return:

None

DontQueueSends()

Purpose:

This method sets the value of the mQueueSends data member to false.

Access :

Inline, Public, Virtual

Prototype:

virtual void DontQueueSends();
Parameters:

None

Return:

None

GetLocalAddress()

Purpose:

Return the network address of your local computer.

Access :

Pure virtual, Public

Prototype:

virtual LInternetAddress*	GetLocalAddress() = 0;
Parameters:

None

Return:

A pointer to the address.

GetState()

Purpose:

Return the current state of the endpoint.

Access :

Pure virtual, Public

Prototype:

virtual EEndpointState		GetState() = 0;
Parameters:

None

Return:

None

IsAckingSends()

Purpose:

Dtermine whether the endpoint is acknowledging sends.

Access :

Pure virtual, Public

Prototype:

virtual Boolean				IsAckingSends() = 0;
Parameters:

None

Return:

Returns true if the endpoint is ACK-ing sends.

IsQueuingSends()

Purpose:

Determines if the endpoint is queuing sends.

Access :

Virtual, Public

Prototype:

virtual Boolean				IsQueuingSends();
Parameters:

None

Return:

Returns true if the endpoint is queuing sends.

QueueSends()

Purpose:

Directs the endpoint to queue sends.

Access :

Virtual, Public

Prototype:

virtual void				QueueSends();
Parameters:

None

Return:

None

Unbind()

Purpose:

Release a previously-bound TCP port.

Access :

Pure virtual, Public

Prototype:

virtual void				Unbind() = 0;
Parameters:

None

Return:

None

mQueueSends

Purpose:

State variable for whether to queue send traffic for the endpoint.

Access :

Protected

Prototype:

Boolean mQueueSends;

 


[ 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