HTTP module
ParserObserver
Abstract observer interface for HTTP parser events.
#include <icy/http/parser.h>
class ParserObserverDefined in src/http/include/icy/http/parser.h:27
- Subclassed by
ConnectionAdapter
Public Methods
| Return | Name | Description |
|---|---|---|
void | onParserHeader virtual | Called for each parsed HTTP header name/value pair. |
void | onParserHeadersEnd virtual | Called when all HTTP headers have been parsed. |
void | onParserChunk virtual | Called for each chunk of body data received. |
void | onParserEnd virtual | Called when the HTTP message is fully parsed. |
void | onParserError virtual | Called when a parse error occurs. |
onParserHeader
virtual
virtual void onParserHeader(const std::string & name, const std::string & value)Defined in src/http/include/icy/http/parser.h:33
Called for each parsed HTTP header name/value pair.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | Header field name. |
value | const std::string & | Header field value. |
onParserHeadersEnd
virtual
virtual void onParserHeadersEnd(bool upgrade)Defined in src/http/include/icy/http/parser.h:37
Called when all HTTP headers have been parsed.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
upgrade | bool | True if the connection should be upgraded (e.g. to WebSocket). |
onParserChunk
virtual
virtual void onParserChunk(const char * data, size_t len)Defined in src/http/include/icy/http/parser.h:42
Called for each chunk of body data received.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
data | const char * | Pointer to the body data chunk. |
len | size_t | Length of the chunk in bytes. |
onParserEnd
virtual
virtual void onParserEnd()Defined in src/http/include/icy/http/parser.h:45
Called when the HTTP message is fully parsed.
Reimplemented by
onParserError
virtual
virtual void onParserError(const Error & err)Defined in src/http/include/icy/http/parser.h:49
Called when a parse error occurs.
