Rudiments
Public Member Functions
client Class Reference

Inherits filedescriptor.

Inherited by clientsocket, and modemclient.

List of all members.

Public Member Functions

 client ()
 client (const client &c)
clientoperator= (const client &c)
virtual ~client ()
virtual void initialize (constnamevaluepairs *cd)=0
virtual int32_t connect ()=0
virtual const char * getVerboseConnectError ()
virtual void setVerboseConnectError (const char *error)

Detailed Description

The client class provides a base class for classes that implement the client side of a client-server communication model.


Constructor & Destructor Documentation

client::client ( )

Creates an instance of the client class.

client::client ( const client c)

Creates an instance of the client class that is a copy of "c".

virtual client::~client ( ) [virtual]

Deletes this instance of the client class.


Member Function Documentation

virtual int32_t client::connect ( ) [pure virtual]

This method must be implemnted by a child class to open a connection to a server, presumably specified in the "cd" parameter of the initalize() method.

This method return an int32_t instead of a bool so child classes that have non atomic connection procedures (such as a modem) can implement return codes other than success or failure (such as abort).

Implemented in inetclientsocket, modemclient, and unixclientsocket.

virtual const char* client::getVerboseConnectError ( ) [virtual]

This method returns NULL by default but may be implemented by a child class to return a detailed reason for a connect failure.

virtual void client::initialize ( constnamevaluepairs cd) [pure virtual]

This method must be implemented by a child class to initialize this instance with the parameters defined in "cd".

Implemented in inetclientsocket, modemclient, and unixclientsocket.

client& client::operator= ( const client c)

Makes this instance of the client class identical to "c".

virtual void client::setVerboseConnectError ( const char *  error) [virtual]

This method may be used to set the verbose connect error.