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

Connection Class Reference

List of all members.

Public Member Functions

 Connection ()
int getDataRead ()
int getForceParsing ()
u_long getID ()
const char * getIpAddr ()
const char * getLocalIpAddr ()
u_short getLocalPort ()
const char * getLogin ()
char getnTries ()
const char * getPassword ()
u_short getPort ()
u_long getTimeout ()
int getToRemove ()
void incnTries ()
int isParsing ()
void setDataRead (int)
void setForceParsing (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 setParsing (int)
void setPassword (const char *)
void setPort (u_short)
void setTimeout (u_long)
void setToRemove (int)
virtual ~Connection ()

Public Attributes

char connectionBuffer [MYSERVER_KB(8)]
Vhosthost
Connectionnext
ProtocolBufferprotocolBuffer
Socket socket
void * thread

Private Attributes

int dataRead
int forceParsing
u_long ID
char ipAddr [MAX_IP_STRING_LEN]
char localIpAddr [MAX_IP_STRING_LEN]
u_short localPort
string login
char nTries
int parsing
string password
u_short port
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::getDataRead  ) 
 

Return the number of bytes read.

int Connection::getForceParsing  ) 
 

Get if the connection is forced to be parsed.

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.

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::isParsing  ) 
 

Return if the connection is currently parsed.

void Connection::setDataRead int  dr  ) 
 

Set the number of bytes read.

Parameters:
dr The new data read value.

void Connection::setForceParsing int  fp  ) 
 

Force the parsing of this connection on next server loop.

Parameters:
fp The new force parsing 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::setParsing int  np  ) 
 

Set the parsing state.

Parameters:
np The new parsing state.

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::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[MYSERVER_KB(8)]
 

This buffer must be used only by the ClientsTHREAD class.

int Connection::dataRead [private]
 

Number of bytes ready in the buffer.

int Connection::forceParsing [private]
 

Force the connection to be parsed.

Vhost* Connection::host
 

Pointer to an host structure.

u_long Connection::ID [private]
 

Identifier for the connection.

char Connection::ipAddr[MAX_IP_STRING_LEN] [private]
 

Remote IP address.

char Connection::localIpAddr[MAX_IP_STRING_LEN] [private]
 

Local IP used to connect to.

u_short Connection::localPort [private]
 

Local port used to connect to.

string Connection::login [private]
 

Login name.

Connection* Connection::next
 

Next connection in linked list.

char Connection::nTries [private]
 

# of tries for an authorized login.

int Connection::parsing [private]
 

The server is parsing this connection.

string Connection::password [private]
 

Password used to log in.

u_short Connection::port [private]
 

Remote port used.

ProtocolBuffer* Connection::protocolBuffer
 

Buffer for the connecion struct. Used by protocols.

Socket Connection::socket
 

Connection socket.

void* Connection::thread
 

Pointer to the thread struct that is using the connection.

u_long Connection::timeout [private]
 

Current timeout for the connection.

int Connection::toRemove [private]
 


Generated on Wed Nov 8 13:12:48 2006 for MyServer by doxygen 1.3.6