ghttp_parser_received()#
Parses an HTTP message from the given buffer using the ghttp_parser_create() instance.
Prototype
int ghttp_parser_received(
GHTTP_PARSER *parser,
char *buf,
size_t received
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the |
|
|
Pointer to the buffer containing the HTTP message data. |
|
|
Number of bytes available in |
Return Value
Returns the number of bytes successfully parsed. Returns -1 if an error occurs during parsing.
Notes
[‘This function uses http_parser_execute() to process the HTTP message.’, ‘If the parser encounters an error, it logs the issue and returns -1.’, ‘The function checks for upgrade requests and handles them accordingly.’]
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples