Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

POClient Class Reference

#include <POClient.h>

List of all members.

Public Types

enum  CLIENT_STATE { CONNECTED, WAIT_CLIST, DISCONNECTED }

Public Slots

void sendMessage (const POAddress &adr, const POMessage *msg)
void sendMessage (const POMessage *msg)

Signals

void socketConnected (POClient *client)
void connectionEstablished (POClient *client)
void receivedMessage (const POMessage *msg)
void connectionLost (POClient *)
void newPOBox (const string &clientname, const string &boxname)

Public Member Functions

 POClient (int fd)
 POClient (const string &host, int port)
 ~POClient ()
string getClientName () const
int getState () const
vector< string > getAllBoxes () const


Member Enumeration Documentation

enum POClient::CLIENT_STATE
 

Enumeration values:
CONNECTED 
WAIT_CLIST 
DISCONNECTED 


Constructor & Destructor Documentation

POClient::POClient int  fd  ) 
 

Joins an existing socket

Parameters:
fd - the socket descriptor

POClient::POClient const string &  host,
int  port
 

Opens a new socket to the specified host and port, when the socket is connected SocketConnected() will be emited at which point the server will be waiting for a POBoxListMsg from the local PostOffice

Parameters:
host - the host to connect to
port - the port
Returns:

POClient::~POClient  ) 
 


Member Function Documentation

void POClient::connectionEstablished POClient client  )  [signal]
 

void POClient::connectionLost POClient  )  [signal]
 

vector<string> POClient::getAllBoxes  )  const [inline]
 

string POClient::getClientName  )  const [inline]
 

int POClient::getState  )  const [inline]
 

void POClient::newPOBox const string &  clientname,
const string &  boxname
[signal]
 

void POClient::receivedMessage const POMessage msg  )  [signal]
 

void POClient::sendMessage const POMessage msg  )  [slot]
 

Sends the message regardless of destination

Parameters:
msg - the message to send

void POClient::sendMessage const POAddress adr,
const POMessage msg
[slot]
 

Assumes that the message->from field has been set and then sees if the remote PostOffice has a mailbox for adr->pobox;

Exceptions:
POErrorMsg* if the message could not be sent
Parameters:
adr - the destination address

void POClient::socketConnected POClient client  )  [signal]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 12:49:28 2004 for pexpr by doxygen 1.3.4