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

Connection Class Reference

List of all members.

Public Member Functions

int allowDelete (bool bWait=false)
 Connection ()
ClientsThreadgetActiveThread ()
int getDataRead ()
event * getEvent ()
u_long getID ()
const char * getIpAddr ()
const char * getLocalIpAddr ()
u_short getLocalPort ()
const char * getLogin ()
char getnTries ()
const char * getPassword ()
u_short getPort ()
int getPriority ()
u_long getTimeout ()
int getToRemove ()
void incnTries ()
int isForceControl ()
int isScheduled ()
void setActiveThread (ClientsThread *t)
void setDataRead (int)
void setForceControl (int)
void setID (u_long)
void setIpAddr (const char *)
void setLocalIpAddr (const char *)
void setLocalPort (u_short)
void setLogin (const char *)
void setnTries (char)
void setPassword (const char *)
void setPort (u_short)
void setPriority (int)
void setScheduled (int)
void setTimeout (u_long)
void setToRemove (int)
virtual ~Connection ()

Public Attributes

char * connectionBuffer
Vhosthost
ProtocolBufferprotocolBuffer
Socketsocket

Protected Attributes

int dataRead
event ev
int forceControl
u_long ID
string ipAddr
string localIpAddr
u_short localPort
string login
char nTries
string password
u_short port
int priority
int scheduled
ClientsThreadthread
u_long timeout
int toRemove

Constructor & Destructor Documentation

Connection::Connection  ) 
 

Constructor for the Connection class.

Connection::~Connection  )  [virtual]
 

Destroy the object.


Member Function Documentation

int Connection::allowDelete bool  bWait = false  ) 
 

Return if the connection may be deleted by the server.

ClientsThread* Connection::getActiveThread  ) 
 

Get the thread that is using the connection.

int Connection::getDataRead  ) 
 

Return the number of bytes read.

event* Connection::getEvent  ) 
 

u_long Connection::getID  ) 
 

Return the IDentifier for the connection.

const char * Connection::getIpAddr  ) 
 

Get the IP address of the client.

const char * Connection::getLocalIpAddr  ) 
 

Get the IP address of the local interface used to connect to.

u_short Connection::getLocalPort  ) 
 

Get the local port used to connect to.

const char * Connection::getLogin  ) 
 

Get the login name used by the connection user.

char Connection::getnTries  ) 
 

Get the attempts number to authenticate the user.

const char * Connection::getPassword  ) 
 

Return the password submitted by the user.

u_short Connection::getPort  ) 
 

Get the port used by the connection.

int Connection::getPriority  ) 
 

Get the connection priority.

u_long Connection::getTimeout  ) 
 

Get the timeout to use with the connection.

int Connection::getToRemove  ) 
 

Return if the connection must be removed and why.

void Connection::incnTries  ) 
 

Increment by 1 the # of attempts to authenticate the user.

int Connection::isForceControl  ) 
 

Get if the connection is forced to be parsed.

int Connection::isScheduled  ) 
 

Return if the connection is scheduled.

void Connection::setActiveThread ClientsThread t  ) 
 

Set the thread that is currently using the connection.

void Connection::setDataRead int  dr  ) 
 

Set the number of bytes read.

Parameters:
dr The new data read value.

void Connection::setForceControl int  fp  ) 
 

Force the control of this connection on next server loop.

Parameters:
fp The new force control value even if there is new data.

void Connection::setID u_long  nID  ) 
 

Set the IDentifier for the connection.

Parameters:
nID The new ID.

void Connection::setIpAddr const char *  na  ) 
 

Set the IP address of the client.

Parameters:
na The new IP address.

void Connection::setLocalIpAddr const char *  na  ) 
 

Set the IP address of the local interface used to connect to.

Parameters:
na The new local IP address.

void Connection::setLocalPort u_short  np  ) 
 

Set the local port used to connect to.

Parameters:
np The new local port.

void Connection::setLogin const char *  loginName  ) 
 

Set the login name for the connection user.

Parameters:
loginName The login name.

void Connection::setnTries char  n  ) 
 

Set the # of attempts to authenticate the user.

  • n The new number of tries.

void Connection::setPassword const char *  p  ) 
 

Set the password for the user.

Parameters:
p The new password.

void Connection::setPort u_short  newPort  ) 
 

Set the port used by the connection.

Parameters:
newPort The new port.

void Connection::setPriority int  p  ) 
 

Set the connection priority.

Parameters:
p The new priority.

void Connection::setScheduled int  np  ) 
 

Set if the connection is scheduled by the server.

Parameters:
np The new scheduled state.

void Connection::setTimeout u_long  nTimeout  ) 
 

Set the timeout to use with the connection.

Parameters:
nTimeout The new timeout value.

void Connection::setToRemove int  r  ) 
 

Set the reason to remove the connection.

Parameters:
r Set if the connection has to be removed.


Member Data Documentation

char* Connection::connectionBuffer
 

This buffer must be used only by the ClientsTHREAD class.

int Connection::dataRead [protected]
 

Number of bytes ready in the buffer.

event Connection::ev [protected]
 

Libevent event, used by the connections scheduler.

int Connection::forceControl [protected]
 

Force the connection to be parsed.

Vhost* Connection::host
 

Pointer to an host structure.

u_long Connection::ID [protected]
 

Identifier for the connection.

string Connection::ipAddr [protected]
 

Remote IP address.

string Connection::localIpAddr [protected]
 

Local IP used to connect to.

u_short Connection::localPort [protected]
 

Local port used to connect to.

string Connection::login [protected]
 

Login name.

char Connection::nTries [protected]
 

# of tries for an authorized login.

string Connection::password [protected]
 

Password used to log in.

u_short Connection::port [protected]
 

Remote port used.

int Connection::priority [protected]
 

Connection priority, used by the scheduler.

ProtocolBuffer* Connection::protocolBuffer
 

Buffer for the connection struct. Used by protocols.

int Connection::scheduled [protected]
 

The server has scheduled this connection.

Socket* Connection::socket
 

Connection socket.

ClientsThread* Connection::thread [protected]
 

u_long Connection::timeout [protected]
 

Current timeout for the connection.

int Connection::toRemove [protected]
 


Generated on Thu May 1 12:41:00 2008 for MyServer by  doxygen 1.3.9.1