/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */This module contains the routines for handling the set of active sockets currently in use by the multithreaded clients. It is an internal module to the Library, the application interface is implemented in the Event Module. Look for more information in the Multithread Specifications.
This module is implemented by HTThread.c, and it is a part of the W3C Reference Library.
#ifndef HTTHREAD_H #define HTTHREAD_H #include "HTAccess.h"
extern BOOL HTThreadInit NOPARAMS;
HTNetInfo
data structure.
extern BOOL HTThread_new PARAMS((HTNetInfo * new_net)); extern BOOL HTThread_clear PARAMS((HTNetInfo * old_net));
extern BOOL HTThread_kill PARAMS((HTNetInfo * net));
extern HTRequest *HTThread_isAlive PARAMS((HTNetInfo * net));
READ
and
WRITE
.
extern int HTThreadGetFDInfo PARAMS((fd_set * read, fd_set * write));
typedef enum _HTThreadAction { THD_SET_WRITE=0, THD_CLR_WRITE, THD_SET_READ, THD_CLR_READ, THD_SET_INTR, THD_CLR_INTR, THD_CLOSE, THD_SET_CONNECT, THD_CLR_CONNECT } HTThreadAction;
extern void HTThreadState PARAMS((SOCKFD sockfd, HTThreadAction action)); extern void HTThreadStateByRequest PARAMS((HTRequest * request, HTThreadAction action));This function makes life easier if you want to mark all sockets as interrupted.
extern BOOL HTThreadMarkIntrAll PARAMS((CONST fd_set * fd_user));
extern BOOL HTThreadIntr PARAMS((SOCKFD sockfd));
extern BOOL HTThreadActive NOPARAMS;
select
function has returned a set of pending
sockets this functions selects one of them and finds the
correseponding request structure.
extern HTRequest *HTThread_getRequest PARAMS((CONST fd_set * fd_read, CONST fd_set * fd_write)); #endifEnd of HTThread module