@@ -74,35 +74,57 @@ struct http2_state {
74
74
double stream_state_buffer[IDX_STREAM_STATE_COUNT];
75
75
};
76
76
77
+ Freelist<nghttp2_data_chunk_t , FREELIST_MAX>
78
+ data_chunk_free_list;
79
+
80
+ Freelist<Nghttp2Stream, FREELIST_MAX> stream_free_list;
81
+
82
+ Freelist<nghttp2_header_list, FREELIST_MAX> header_free_list;
83
+
84
+ Freelist<nghttp2_data_chunks_t , FREELIST_MAX>
85
+ data_chunks_free_list;
86
+
87
+ Nghttp2Session::Callbacks Nghttp2Session::callback_struct_saved[2 ] = {
88
+ Callbacks (false ),
89
+ Callbacks (true )};
90
+
77
91
Http2Options::Http2Options (Environment* env) {
78
92
nghttp2_option_new (&options_);
79
93
80
94
uint32_t * buffer = env->http2_state_buffer ()->options_buffer ;
81
95
uint32_t flags = buffer[IDX_OPTIONS_FLAGS];
82
96
83
97
if (flags & (1 << IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE)) {
84
- SetMaxDeflateDynamicTableSize (
98
+ nghttp2_option_set_max_deflate_dynamic_table_size (
99
+ options_,
85
100
buffer[IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE]);
86
101
}
87
102
88
103
if (flags & (1 << IDX_OPTIONS_MAX_RESERVED_REMOTE_STREAMS)) {
89
- SetMaxReservedRemoteStreams (
104
+ nghttp2_option_set_max_reserved_remote_streams (
105
+ options_,
90
106
buffer[IDX_OPTIONS_MAX_RESERVED_REMOTE_STREAMS]);
91
107
}
92
108
93
109
if (flags & (1 << IDX_OPTIONS_MAX_SEND_HEADER_BLOCK_LENGTH)) {
94
- SetMaxSendHeaderBlockLength (
110
+ nghttp2_option_set_max_send_header_block_length (
111
+ options_,
95
112
buffer[IDX_OPTIONS_MAX_SEND_HEADER_BLOCK_LENGTH]);
96
113
}
97
114
98
- SetPeerMaxConcurrentStreams (100 ); // Recommended default
115
+ // Recommended default
116
+ nghttp2_option_set_peer_max_concurrent_streams (options_, 100 );
99
117
if (flags & (1 << IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS)) {
100
- SetPeerMaxConcurrentStreams (
118
+ nghttp2_option_set_peer_max_concurrent_streams (
119
+ options_,
101
120
buffer[IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS]);
102
121
}
103
122
104
123
if (flags & (1 << IDX_OPTIONS_PADDING_STRATEGY)) {
105
- SetPaddingStrategy (buffer[IDX_OPTIONS_PADDING_STRATEGY]);
124
+ padding_strategy_type strategy =
125
+ static_cast <padding_strategy_type>(
126
+ buffer[IDX_OPTIONS_PADDING_STRATEGY]);
127
+ SetPaddingStrategy (strategy);
106
128
}
107
129
}
108
130
0 commit comments