#include <cHttpProtocolStream.h>
|
| | cHttpProtocolStreamBase (cHttpFactory *pFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut) |
| |
| virtual | ~cHttpProtocolStreamBase () |
| |
| HRESULT | ServePageError (cStringA sURLFailed, HTTPRET_TYPE eRetCode) |
| |
| HRESULT | ServePageGenericNoChange (const FILECHAR_t *pszSrcFile) |
| |
| HRESULT | ServePageStream (cHttpHeaderServer &Head, cStreamInput *pInp) |
| |
| HRESULT | ServePageQueue (const ATOMCHAR_t *pszURL, MIME_TYPE eMimeType, cStream &src) |
| |
| HRESULT | ServePageFile (const FILECHAR_t *pszSrcFile, MIME_TYPE eMimeType=MIME_UNKNOWN, cTimeInt *pdateIfModifiedSince=nullptr, bool bHeaderOnly=false) |
| |
| virtual HRESULT | ProcessStreamPacket () override |
| |
| | cProtocolStream (IProtocolFactory *pProtocolFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut) |
| |
| virtual | ~cProtocolStream () |
| |
| HASHCODE_t | get_HashCode () const noexcept |
| |
| | STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept override |
| |
| | STDMETHOD_ (cString, get_Name)() const override |
| |
| | STDMETHOD_ (cStringA, get_SymName)() const override |
| |
| bool | isConnected () const |
| |
| cStreamInput * | get_StreamInp () const |
| |
| cStreamOutput * | get_StreamOut () const |
| |
| virtual size_t | get_ProtocolMaxMessageSize () const |
| |
| virtual HRESULT | DisposeThis () |
| |
| virtual HRESULT | OnTickStream () |
| |
| | UNITTEST_FRIEND (cHttpCommon) |
| |
The HTTP servers side of a HTTP client connection. via cHttpFactory base for cHttpProtocolStream
◆ cHttpProtocolStreamBase()
◆ ~cHttpProtocolStreamBase()
| GrayLib::cHttpProtocolStreamBase::~cHttpProtocolStreamBase |
( |
| ) |
|
|
virtual |
◆ ProcessStreamPacket()
| HRESULT GrayLib::cHttpProtocolStreamBase::ProcessStreamPacket |
( |
| ) |
|
|
overridevirtual |
◆ ServePageError()
Serve up a default error page for this server. virtual allows custom server error pages.
- pszFailedRequest = the name of the page i just tried to get that caused the error? eRetCode = HTTPRET_ER_404
- Returns
- length of bytes written.
◆ ServePageFile()
| HRESULT GrayLib::cHttpProtocolStreamBase::ServePageFile |
( |
const FILECHAR_t * |
pszSrcFile, |
|
|
MIME_TYPE |
eMimeType = MIME_UNKNOWN, |
|
|
cTimeInt * |
pdateIfModifiedSince = nullptr, |
|
|
bool |
bHeaderOnly = false |
|
) |
| |
Serve the data from the local file system directly. (no template translation) Get proper Last-Modified: time. HTTP_TAG_IfModifiedSince
- Returns
- HTTPRET_TYPE Code.
◆ ServePageGenericNoChange()
| HRESULT GrayLib::cHttpProtocolStreamBase::ServePageGenericNoChange |
( |
const FILECHAR_t * |
pszSrcFile | ) |
|
Send response that the page has not changed. return 304 (not modified) if the "If-Modified-Since" is not true. "\r\n" = 0d0a
- Returns
- length sent.
◆ ServePageQueue()
Send a cStreamQueue (maybe memory blob) as a response to a request.
◆ ServePageStream()
Send the response (via cStreamInput source) to some request from the client. ASSUME HTTP_TAG_ContentLength is already set in cHttpHeaderServer.
- Todo:
- send HTTP compressed or chunked ?
◆ m_pFactory
| cHttpFactory* const GrayLib::cHttpProtocolStreamBase::m_pFactory |
|
protected |
my parent HTTP server. it created me for cNetServer.
The documentation for this class was generated from the following files: