/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */This module keeps a list of transport methods with associated access code. New transport protocols may be registered at any time. This allows the application to easily hook in its own transport layers. The purpose of the
HTTransport object is to contain transport
dependent methods for opening and closing a connection to the
transport and also to get an input stream and an output strean for
reading and writing to the transport respectively.This module is implemented by HTTrans.c, and it is a part of the W3C Reference Library.
#ifndef HTTRANS_H #define HTTRANS_HAll the transports supported directly by the Library can be initiated using the function
HTTransportInit() in HTInit module
typedef struct _HTTransport HTTransport; #include "HTIOStream.h" #include "HTChannl.h"
extern BOOL HTTransport_add (const char * name, HTChannelMode mode, HTInput_new * get_input, HTOutput_new * get_output);
extern BOOL HTTransport_delete (const char * name);
extern BOOL HTTransport_deleteAll (void);
extern HTTransport * HTTransport_find (HTRequest * request, const char * name);
extern HTChannelMode HTTransport_mode (HTTransport * tp);
struct _HTTransport {
char * name;
HTChannelMode mode; /* Channel mode supported */
HTInput_new * input_new; /* Input stream creation method */
HTOutput_new * output_new; /* Output stream creation method */
};
#endif /* HTTRANS_H */