![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cHttpFactory.h>
Public Member Functions | |
| cHttpFactory (const char *pszServName=GRAY_NAMES "HTTPServer") | |
| virtual | ~cHttpFactory () |
| ITERATE_t | AddHttpController (cHttpController *pPageType) |
| HTTPRET_TYPE | OnVerbFactory (cHttpProtocolStreamBase *pClient, const cHttpHeaderClient &request, cStringA sURLReq="") |
| virtual const char * | get_ProtocolName () const override |
| Overridden from IProtocolFactory. More... | |
| virtual HRESULT | TestProtocol (const BYTE *pszPrefixData, size_t iPrefixLen) const override |
| virtual cProtocolStreamPtr | CreateProtocolStream (IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut) override |
| UNITTEST_FRIEND (cHttpFactory) | |
Public Member Functions inherited from GrayLib::IProtocolFactory | |
| virtual | ~IProtocolFactory () |
| virtual size_t | get_ProtocolMaxMessageSize () const |
Public Attributes | |
| const char *const | m_pszServName |
| just a static string id for the server. More... | |
a HTTP Protocol Factory. Define stuff about the HTTP server based on cNetServer. port 80 is default.
| GrayLib::cHttpFactory::cHttpFactory | ( | const char * | pszServName = GRAY_NAMES "HTTPServer" | ) |
|
virtual |
| ITERATE_t GrayLib::cHttpFactory::AddHttpController | ( | cHttpController * | pPageType | ) |
Add a controller to serve up an URL path.
|
inlineoverridevirtual |
Override IProtocolFactory
Implements GrayLib::IProtocolFactory.
Reimplemented in GrayLib::cHttpScriptedFactory.
|
inlineoverridevirtual |
| HTTPRET_TYPE GrayLib::cHttpFactory::OnVerbFactory | ( | cHttpProtocolStreamBase * | pClient, |
| const cHttpHeaderClient & | request, | ||
| cStringA | sURLReq = "" |
||
| ) |
An HTTP message has been received. Try to figure out what to do with the request. Which cHttpController? allow override for other actions as well. pController->OnVerb() can serve up its own errors and return OK if it wants. even HTTPRET_ER_404 if request is under its path.
|
overridevirtual |
Overridden from IProtocolFactory Is this new connection an HTTP client incoming ?
Implements GrayLib::IProtocolFactory.
| GrayLib::cHttpFactory::UNITTEST_FRIEND | ( | cHttpFactory | ) |
| const char* const GrayLib::cHttpFactory::m_pszServName |
just a static string id for the server.