Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

conn_handler.h File Reference

connection handler object (represents a connection to a user agent). More...

#include "common.h"
#include <sys/types.h>
#include <time.h>

Include dependency graph for conn_handler.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Typedefs

typedef ConnHandler * ConnHandler
 define a convenience name for the ConnHandler object.


Functions

int chModulePreInit ()
 initialise module (calculate constant values and allocate common buffers). More...

int chModuleTerminate ()
 free all ressources allocated by the module. More...

ConnHandler chInit (int server_socket)
 creates and returns a new CHData connection handler object. More...

int chGetSocket (const ConnHandler this)
 returns a file descriptor to the connection handler's communication socket. More...

time_t chGetStamp (const ConnHandler this)
 get a ConnectionHandler's transmit timestamp. More...

time_t chgetStamp (const ConnHandler this)
 returns the time where the last block if data was exchanged. More...

int chReceive (ConnHandler this)
 handles a request pending at the connection handlers socket. More...

int chIsDataPending (const ConnHandler this)
 returns true if there is pending data. More...

int chSend (ConnHandler this)
 send some of the data currently in queue. More...

int chProcess (ConnHandler this)
 do additional data processing. More...

int chGetError (const ConnHandler this)
 return the connection handler's current error status. More...

int chTerminate (ConnHandler this)
 terminate the connection handler. More...


Detailed Description

connection handler object (represents a connection to a user agent).

Definition in file conn_handler.h.


Function Documentation

int chGetError const ConnHandler    this
 

return the connection handler's current error status.

Parameters:
this  connection handler
Returns:
0 if no error occured, an errno error code else

Referenced by svMain().

int chGetSocket const ConnHandler    this
 

returns a file descriptor to the connection handler's communication socket.

Parameters:
the  connection handler whose socket is to be returned
Returns:
file descriptor of the connection handler's comm. socket

Referenced by svCloseConnection(), and svMain().

time_t chGetStamp const ConnHandler    this
 

get a ConnectionHandler's transmit timestamp.

returns the time the ConnectionHandler ch made its last transmission from or to the remote end

Parameters:
the  connection handler
Returns:
the time the last transmission from or to the remote end was made

Referenced by svMain().

ConnHandler chInit int    server_socket
 

creates and returns a new CHData connection handler object.

Parameters:
server_socket  a server socket with a pending connection request
chInit creates and initializes a CHData connection handler object. If a connection can be established a CHData object representing the connection is returned.

Returns:
pointer to a CHData object on success, NULL on failure

Referenced by svMain().

int chIsDataPending const ConnHandler    this
 

returns true if there is pending data.

Parameters:
this  connection handler
/retval true there is data currently waiting to be send /retval false send queue is idle

Referenced by forwardSendToProtHandler(), and svMain().

int chModulePreInit  
 

initialise module (calculate constant values and allocate common buffers).

Returns:
0 on success and -1 on failure

int chModuleTerminate  
 

free all ressources allocated by the module.

Returns:
0 on success and -1 on failure

int chProcess ConnHandler    this
 

do additional data processing.

Parameters:
this  connection handler
Gives the thread of control to the connection handler this, allowing it to preprocess some data while it's socket is busy. In most cases it will just call a protocol handlers phProcess in turn to allow it to fill a second send buffer until the socket is idle again.

Returns:
don't know...

Referenced by svMain().

int chReceive ConnHandler    this
 

handles a request pending at the connection handlers socket.

Parameters:
this  connection handler with pending data
chReceive reads all pending data from the connection handlers communication socket and takes appropriate actions.

Returns:
don't know...

Referenced by svMain().

int chSend ConnHandler    this
 

send some of the data currently in queue.

Parameters:
this  connection handler
The connection handler this is requested to send some data.

Returns:
don't know...

Referenced by svMain().

int chTerminate ConnHandler    this
 

terminate the connection handler.

Parameters:
this  connection handler to be terminated
Closes the connection, terminates all related objects and frees all buffers

Returns:
don't know...

Referenced by svCloseConnection(), and svMain().

time_t chgetStamp const ConnHandler    this
 

returns the time where the last block if data was exchanged.

Parameters:
a  connection handler
Returns:
a timestamp


Generated on Fri Jan 25 22:40:44 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001