diff options
Diffstat (limited to 'ACE/apps/JAWS/clients/Caching/http_handler.h')
-rw-r--r-- | ACE/apps/JAWS/clients/Caching/http_handler.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/ACE/apps/JAWS/clients/Caching/http_handler.h b/ACE/apps/JAWS/clients/Caching/http_handler.h index db4c68aa200..95b7471e527 100644 --- a/ACE/apps/JAWS/clients/Caching/http_handler.h +++ b/ACE/apps/JAWS/clients/Caching/http_handler.h @@ -1,19 +1,15 @@ /* -*- c++ -*- */ -// Hey, Emacs! This is a C++ file. -// $Id$ -// ============================================================================ -// -// = LIBRARY -// apps/JAWS/clients/Caching -// -// = FILENAME -// http_handler.h -// -// = AUTHOR -// James Hu -// -// ============================================================================ +//============================================================================= +/** + * @file http_handler.h + * + * $Id$ + * + * @author James Hu + */ +//============================================================================= + #include "ace/SOCK_Connector.h" @@ -24,28 +20,30 @@ #include "ace/Connector.h" #include "ace/Svc_Handler.h" +/** + * @class HTTP_Handler + * + * @brief A simple HTTP protocol handler for clients. + * + * Checks to see if the requested file is already cached. If + * so, it says so. If not, the request is issued to the + * connection. The fetched file is cached. + */ class HTTP_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> - // = TITLE - // A simple HTTP protocol handler for clients. - // - // = DESCRIPTION - // Checks to see if the requested file is already cached. If - // so, it says so. If not, the request is issued to the - // connection. The fetched file is cached. { public: // = Initialization methods. HTTP_Handler (void); HTTP_Handler (const char * path); + /// Open hook. virtual int open (void *); - // Open hook. + /// Entry points defined by the abstract Svc_Handler. virtual int svc (void); - // Entry points defined by the abstract Svc_Handler. + /// Accessor to the file being fetched. const char *filename (void) const; - // Accessor to the file being fetched. private: char request_[BUFSIZ]; @@ -55,27 +53,29 @@ private: size_t response_size_; }; +/** + * @class HTTP_Connector + * + * @brief A simple HTTP connector. + * + * Creates an HTTP Handler based on the URL, and then delegates + * to to the SOCK_CONNECTOR. Adapter pattern. + */ class HTTP_Connector - // = TITLE - // A simple HTTP connector. - // - // = DESCRIPTION - // Creates an HTTP Handler based on the URL, and then delegates - // to to the SOCK_CONNECTOR. Adapter pattern. { public: + /// User entry point into the HTTP connector. int connect (const char * url); - // User entry point into the HTTP connector. private: + /// Helper function. int parseurl (const char *url, char *host, u_short *port, char *path); - // Helper function. private: + /// Factory that actively establishes a connection with an HTTP + /// server. ACE_Connector<HTTP_Handler, ACE_SOCK_CONNECTOR> connector_; - // Factory that actively establishes a connection with an HTTP - // server. }; |