queue.c File Reference

#include "nsd.h"

Data Structures

struct  ConnData

Functions

void NsInitQueue (void)
int Ns_QueueConn (void *drv, void *arg)
Ns_Conn * Ns_GetConn (void)
void NsQueueConn (Conn *connPtr)
int NsTclServerObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
void NsConnArgProc (Tcl_DString *dsPtr, void *arg)
void NsConnThread (void *arg)
void NsCreateConnThread (Pool *poolPtr)
void NsJoinConnThreads (void)
void NsAppendConn (Tcl_DString *dsPtr, Conn *connPtr, char *state)

Function Documentation

Ns_Conn* Ns_GetConn ( void   ) 

----------------------------------------------------------------------

Ns_GetConn --

Return the current connection in this thread.

Results: Pointer to conn or NULL.

Side effects: None.

----------------------------------------------------------------------

int Ns_QueueConn ( void *  drv,
void *  arg 
)

----------------------------------------------------------------------

Ns_QueueConn --

Queue a connection from a loadable driver (no longer supported).

Results: NS_ERROR.

Side effects: None.

----------------------------------------------------------------------

void NsAppendConn ( Tcl_DString *  dsPtr,
Conn connPtr,
char *  state 
)

----------------------------------------------------------------------

NsAppendConn --

Append connection data to a dstring.

Results: None.

Side effects: None.

----------------------------------------------------------------------

void NsConnArgProc ( Tcl_DString *  dsPtr,
void *  arg 
)

----------------------------------------------------------------------

NsConnArgProc --

Ns_GetProcInfo callback for a running conn thread.

Results: None.

Side effects: See NsAppendConn.

----------------------------------------------------------------------

void NsConnThread ( void *  arg  ) 

----------------------------------------------------------------------

NsConnThread --

Main connection service thread.

Results: None.

Side effects: Connections are removed from the waiting queue and serviced.

----------------------------------------------------------------------

Set the conn thread name.

Start handling connections.

Wait for a connection to arrive, exiting if one doesn't arrive in the configured timeout period.

Pull the first connection off the waiting list.

Run the connection.

Remove from the active list and push on the free list.

Append this thread to list of threads to reap.

Mark this thread as no longer active.

void NsCreateConnThread ( Pool poolPtr  ) 

----------------------------------------------------------------------

NsCreateConnThread --

Create a connection thread.

Results: None.

Side effects: New thread.

----------------------------------------------------------------------

Reap any dead threads.

Create a new connection thread.

void NsInitQueue ( void   ) 

----------------------------------------------------------------------

NsInitQueue --

Init connection queue.

Results: None.

Side effects: None.

----------------------------------------------------------------------

void NsJoinConnThreads ( void   ) 

----------------------------------------------------------------------

NsJoinConnThreads --

Join any connection threads which have exited.

Results: None.

Side effects: None.

----------------------------------------------------------------------

void NsQueueConn ( Conn connPtr  ) 

----------------------------------------------------------------------

NsQueueConn --

Append a connection to the run queue.

Results: None.

Side effects: Connection will run shortly.

----------------------------------------------------------------------

Queue connection.

int NsTclServerObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclServerObjCmd --

Implement the ns_server Tcl command to return simple statistics about the running server.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

NB: Silence compiler.

nsconf.keepalive.npending


Generated on Tue Sep 4 19:58:56 2007 by  doxygen 1.5.1