readme: improve format, fix code syntax

PR-URL: https://github.com/nodejs/http-parser/pull/305
Reviewed-By: Fedor Indutny <fedor@indutny.com>
make-http-max-header-size-gyp-configurable
oldratlee 9 years ago committed by Fedor Indutny
parent f2c26ee500
commit 737627b2b2

@ -148,7 +148,7 @@ callback in a threadsafe manner. This allows http-parser to be used in
multi-threaded contexts. multi-threaded contexts.
Example: Example:
``` ```c
typedef struct { typedef struct {
socket_t sock; socket_t sock;
void* buffer; void* buffer;
@ -184,7 +184,7 @@ void http_parser_thread(socket_t sock) {
parser supplied to callback functions */ parser supplied to callback functions */
parser->data = my_data; parser->data = my_data;
http_parser_settings settings; / * set up callbacks */ http_parser_settings settings; /* set up callbacks */
settings.on_url = my_url_callback; settings.on_url = my_url_callback;
/* execute parser */ /* execute parser */

Loading…
Cancel
Save