Session Data Structure
A session is the time between the opening and closing of the connection between the client and the server.
The following list describes the most important fields in this data structure:
? sn->client?Pointer to a pblock containing information about the client such as its IP address,DNS name, or certificate.
? sn->csd?Platform-independent client socket descriptor. This pointer is passed to the routines for reading from and writing to the client.



The Session data structure holds variables that apply to a client, regardless of the requests being sent.




typedef struct {
/* Information about the remote client */
pblock *client;
/* The socket descriptor to the remote client */
SYS_NETFD csd;
/* The input buffer for that socket descriptor */
netbuf *inbuf;
} Session;



The following list describes the most important fields in the Session data structure:
? client?Pointer to a pblock containing information about the client such as its IP address, DNS name, or SSL certificate. The ip parameter contains the client's IP address.Do not modify the contents of this pblock.
? csd?The platform-independent client socket descriptor used to communicate with the client. This descriptor can be passed to routines such as net_write to send output to the client.
? inbuf?Pointer to the input buffer for the client socket descriptor. This pointer can be passed to routines such as netbuf_grab or netbuf_getc to receive input from the client.


pblock Data Structure
The parameter block is the hash table that holds pb_entry structures. Its contents are transparent to most code. This data structure is frequently used in NSAPI, pblock provides the basic mechanism for packaging up parameters and values.Many functions exist for creating and managing parameter blocks, and for extracting, adding, and deleting entries.
typedef struct {
int hsize;
struct pb_entry **ht;
} pblock;



Note ? The pblock NSAPI data structure can not be used concurrently by multiple threads.Do not retain any reference to a pblock or its contents after processing of the current request is complete.



pb_entry Data Structure
The pb_entry is a single element in the parameter block.
struct pb_entry {
pb_param *param;
struct pb_entry *next;
};



pb_param Data Structure
The pb_param represents a name-value pair, as stored in a pb_entry.
typedef struct {
char *name,*value;
} pb_param;







More...