Skip to content

Commit b5ad195

Browse files
committed
examples: Adopt nghttp3_recv_settings2
1 parent 5fc10fe commit b5ad195

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ if(ENABLE_JEMALLOC)
148148
endif()
149149
if(NOT ENABLE_LIB_ONLY)
150150
find_package(Libev 4.11)
151-
find_package(Libnghttp3 1.12.0)
151+
find_package(Libnghttp3 1.14.0)
152152
find_package(Libbrotlienc 1.0.9)
153153
find_package(Libbrotlidec 1.0.9)
154154
endif()

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ AM_CONDITIONAL([HAVE_CRYPTO], [ test "x${have_crypto}" = "xyes" ])
448448
# libnghttp3 (required for examples)
449449
have_libnghttp3=no
450450
if test "x${request_libnghttp3}" != "xno"; then
451-
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 1.12.0],
451+
PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 1.14.0],
452452
[have_libnghttp3=yes], [have_libnghttp3=no])
453453
if test "${have_libnghttp3}" = "xno"; then
454454
AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)

examples/client.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,8 @@ void Client::http_stream_close(int64_t stream_id, uint64_t app_error_code) {
21482148
}
21492149

21502150
namespace {
2151-
int http_recv_settings(nghttp3_conn *conn, const nghttp3_settings *settings,
2151+
int http_recv_settings(nghttp3_conn *conn,
2152+
const nghttp3_proto_settings *settings,
21522153
void *conn_user_data) {
21532154
if (!config.quiet) {
21542155
debug::print_http_settings(settings);
@@ -2201,10 +2202,10 @@ int Client::setup_httpconn() {
22012202
.end_trailers = ::http_end_trailers,
22022203
.stop_sending = ::http_stop_sending,
22032204
.reset_stream = ::http_reset_stream,
2204-
.recv_settings = ::http_recv_settings,
22052205
.recv_origin = ::http_recv_origin,
22062206
.end_origin = ::http_end_origin,
22072207
.rand = rand_bytes,
2208+
.recv_settings2 = ::http_recv_settings,
22082209
};
22092210
nghttp3_settings settings;
22102211
nghttp3_settings_default(&settings);

examples/debug.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void print_http_response_headers(int64_t stream_id, const nghttp3_nv *nva,
283283
}
284284
}
285285

286-
void print_http_settings(const nghttp3_settings *settings) {
286+
void print_http_settings(const nghttp3_proto_settings *settings) {
287287
fprintf(outfile,
288288
"http: remote settings\n"
289289
"http: SETTINGS_MAX_FIELD_SECTION_SIZE=%" PRIu64 "\n"

examples/debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void print_http_request_headers(int64_t stream_id, const nghttp3_nv *nva,
116116
void print_http_response_headers(int64_t stream_id, const nghttp3_nv *nva,
117117
size_t nvlen);
118118

119-
void print_http_settings(const nghttp3_settings *settings);
119+
void print_http_settings(const nghttp3_proto_settings *settings);
120120

121121
void print_http_origin(const uint8_t *origin, size_t originlen);
122122

examples/server.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,8 @@ int Handler::http_reset_stream(int64_t stream_id, uint64_t app_error_code) {
11981198
}
11991199

12001200
namespace {
1201-
int http_recv_settings(nghttp3_conn *conn, const nghttp3_settings *settings,
1201+
int http_recv_settings(nghttp3_conn *conn,
1202+
const nghttp3_proto_settings *settings,
12021203
void *conn_user_data) {
12031204
if (!config.quiet) {
12041205
debug::print_http_settings(settings);
@@ -1229,8 +1230,8 @@ int Handler::setup_httpconn() {
12291230
.stop_sending = ::http_stop_sending,
12301231
.end_stream = ::http_end_stream,
12311232
.reset_stream = ::http_reset_stream,
1232-
.recv_settings = ::http_recv_settings,
12331233
.rand = rand_bytes,
1234+
.recv_settings2 = ::http_recv_settings,
12341235
};
12351236
nghttp3_settings settings;
12361237
nghttp3_settings_default(&settings);

0 commit comments

Comments
 (0)