Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# emacs backup file
*~
out64/
out32/
inst.bat

# autotools
*.la
Expand Down
7 changes: 7 additions & 0 deletions lib/includes/nghttp3/nghttp3.h
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,13 @@ typedef struct nghttp3_settings {
* v1.13.0.
*/
nghttp3_qpack_indexing_strat qpack_indexing_strat;

// Setting 0x2b603742ULL 1.14.0
uint64_t enable_web_transport;

// Setting 0xffd277ULL 1.14.0
uint64_t enable_webtransport_datagrams;

} nghttp3_settings;

/**
Expand Down
11 changes: 11 additions & 0 deletions lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,17 @@ int nghttp3_conn_on_settings_entry_received(nghttp3_conn *conn,
nghttp3_qpack_encoder_set_max_dtable_capacity(&conn->qenc,
(size_t)ent->value);
break;


case NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT: {
dest->enable_web_transport = ent->value;
break;
}
case NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT_DATAGRAM: {
dest->enable_webtransport_datagrams = ent->value;
break;
}

case NGHTTP3_SETTINGS_ID_QPACK_BLOCKED_STREAMS:
if (dest->qpack_blocked_streams != 0) {
return NGHTTP3_ERR_H3_SETTINGS_ERROR;
Expand Down
3 changes: 3 additions & 0 deletions lib/nghttp3_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ typedef struct nghttp3_frame_headers {
#define NGHTTP3_H2_SETTINGS_ID_INITIAL_WINDOW_SIZE 0x4
#define NGHTTP3_H2_SETTINGS_ID_MAX_FRAME_SIZE 0x5

#define NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT 0x2b603742ULL
#define NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT_DATAGRAM 0xffd277ULL

typedef struct nghttp3_settings_entry {
uint64_t id;
uint64_t value;
Expand Down
16 changes: 16 additions & 0 deletions lib/nghttp3_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,22 @@ int nghttp3_stream_write_settings(nghttp3_stream *stream,
++fr.settings.niv;
}

if (local_settings->enable_web_transport) {
iv[fr.settings.niv] = (nghttp3_settings_entry){
.id = NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT,
.value = 1,
};
++fr.settings.niv;
}

if (local_settings->enable_webtransport_datagrams) {
iv[fr.settings.niv] = (nghttp3_settings_entry){
.id = NGHTTP3_SETTINGS_ENABLE_WEBTRANSPORT_DATAGRAM,
.value = 1,
};
++fr.settings.niv;
}

len = nghttp3_frame_write_settings_len(&payloadlen, &fr.settings);

rv = nghttp3_stream_ensure_chunk(stream, len);
Expand Down