Sha256: 3510a03bfdc371ce9db5cea07ec260dd42dcbc04fca36aa763849ff821a7f030
Contents?: true
Size: 1.22 KB
Versions: 5
Compression:
Stored size: 1.22 KB
Contents
/** * Copyright (c) 2005 Zed A. Shaw * You can redistribute it and/or modify it under the same terms as Ruby. */ #ifndef http11_parser_h #define http11_parser_h #include <sys/types.h> #if defined(_WIN32) #include <stddef.h> #endif typedef void (*element_cb)(void *data, const char *at, size_t length); typedef void (*field_cb)(void *data, const char *field, size_t flen, const char *value, size_t vlen); typedef struct httpclient_parser { int cs; size_t body_start; int content_len; size_t nread; size_t mark; size_t field_start; size_t field_len; void *data; field_cb http_field; element_cb reason_phrase; element_cb status_code; element_cb chunk_size; element_cb http_version; element_cb header_done; element_cb last_chunk; } httpclient_parser; int httpclient_parser_init(httpclient_parser *parser); int httpclient_parser_finish(httpclient_parser *parser); size_t httpclient_parser_execute(httpclient_parser *parser, const char *data, size_t len, size_t off); int httpclient_parser_has_error(httpclient_parser *parser); int httpclient_parser_is_finished(httpclient_parser *parser); #define httpclient_parser_nread(parser) (parser)->nread #endif
Version data entries
5 entries across 5 versions & 1 rubygems