Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/aws/http/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ enum aws_http_errors {
AWS_ERROR_HTTP_CONNECTION_MANAGER_SHUTTING_DOWN,
AWS_ERROR_HTTP_PROTOCOL_ERROR,
AWS_ERROR_HTTP_STREAM_CLOSED,
AWS_ERROR_HTTP_INVALID_FRAME_SIZE,

AWS_ERROR_HTTP_END_RANGE = 0x0C00,
};
Expand Down
19 changes: 18 additions & 1 deletion include/aws/http/private/h2_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,30 @@

#include <aws/http/private/http_impl.h>

struct aws_h2_decoder_vtable {

int (*on_headers)(uint32_t stream_id, void *userdata);
int (*on_end_headers)(uint32_t stream_id, void *userdata);

int (*on_data)(uint32_t stream_id, const struct aws_byte_cursor *data, void *userdata);

int (*on_rst_stream)(uint32_t stream_id, uint32_t error_code, void *userdata);

int (*on_ping)(bool ack, uint8_t opaque_data[8], void *userdata);
int (*on_setting)(uint16_t setting, uint32_t value, void *userdata);
int (*on_settings_ack)(void *userdata);
int (*on_goaway)(uint32_t last_stream, uint32_t error_code, uint32_t debug_data_length, void *userdata);
int (*on_goaway_debug_data)(const struct aws_byte_cursor *data, void *userdata);
};

/**
* Structure used to initialize an `aws_h2_decoder`.
*/
struct aws_h2_decoder_params {
struct aws_allocator *alloc;
void *user_data;
struct aws_http_decoder_vtable vtable;
struct aws_h2_decoder_vtable vtable;
void *userdata;
};

struct aws_h2_decoder;
Expand Down
8 changes: 2 additions & 6 deletions source/h2_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ static struct aws_http_connection_vtable s_h2_connection_vtable = {
.update_window = NULL,
};

static const struct aws_http_decoder_vtable s_h2_decoder_vtable = {
.on_request = NULL,
.on_response = NULL,
.on_header = NULL,
.on_body = NULL,
.on_done = NULL,
static const struct aws_h2_decoder_vtable s_h2_decoder_vtable = {
.on_data = NULL,
};

/* Common new() logic for server & client */
Expand Down
Loading