/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */This module keeps a list of valid protocol (naming scheme) specifiers with associated access code. New access protocols may be registered at any time.
This module is implemented by HTProt.c, and it is a part of the W3C Reference Library.
#ifndef HTPROT_H #define HTPROT_H #include "HTReq.h" #include "HTAnchor.h" #include "HTEvntrg.h"After the new architecture based on call back functions managed by an eventloop and protocol state machines, the protocol structure has been modified to reflect this call back structure. The
HTEventCallback
is defined in HTEvntrg module.
All the access schemes supported in the Library can be initiated using
the function HTAccessInit()
in HTInit module
An access scheme module takes as a parameter a socket (which is an invalid socket the first time the function is called), a request structure containing details of the request, and the action by which the (valid) socket was selected in the event loop. When the protocol class routine is called, the anchor element in the request is already valid (made valid by HTAccess).
typedef struct _HTProtocol HTProtocol;
extern BOOL HTProtocol_add (CONST char * name, BOOL preemptive, HTEventCallback * client, HTEventCallback * server);
extern BOOL HTProtocol_delete (CONST char * name);
extern BOOL HTProtocol_deleteAll (void);
extern HTProtocol * HTProtocol_find (HTRequest * request, CONST char * access);
extern HTEventCallback * HTProtocol_client (HTProtocol * protocol); extern HTEventCallback * HTProtocol_server (HTProtocol * protocol);
extern BOOL HTProtocol_preemptive (HTProtocol * protocol);
#endif /* HTPROT_H */End of Declaration