(options)
| 234 | const IDX_OPTIONS_FLAGS = 13; |
| 235 | |
| 236 | function updateOptionsBuffer(options) { |
| 237 | let flags = 0; |
| 238 | if (typeof options.maxDeflateDynamicTableSize === 'number') { |
| 239 | flags |= (1 << IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE); |
| 240 | optionsBuffer[IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE] = |
| 241 | options.maxDeflateDynamicTableSize; |
| 242 | } |
| 243 | if (typeof options.maxReservedRemoteStreams === 'number') { |
| 244 | flags |= (1 << IDX_OPTIONS_MAX_RESERVED_REMOTE_STREAMS); |
| 245 | optionsBuffer[IDX_OPTIONS_MAX_RESERVED_REMOTE_STREAMS] = |
| 246 | options.maxReservedRemoteStreams; |
| 247 | } |
| 248 | if (typeof options.maxSendHeaderBlockLength === 'number') { |
| 249 | flags |= (1 << IDX_OPTIONS_MAX_SEND_HEADER_BLOCK_LENGTH); |
| 250 | optionsBuffer[IDX_OPTIONS_MAX_SEND_HEADER_BLOCK_LENGTH] = |
| 251 | options.maxSendHeaderBlockLength; |
| 252 | } |
| 253 | if (typeof options.peerMaxConcurrentStreams === 'number') { |
| 254 | flags |= (1 << IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS); |
| 255 | optionsBuffer[IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS] = |
| 256 | options.peerMaxConcurrentStreams; |
| 257 | } |
| 258 | if (typeof options.paddingStrategy === 'number') { |
| 259 | flags |= (1 << IDX_OPTIONS_PADDING_STRATEGY); |
| 260 | optionsBuffer[IDX_OPTIONS_PADDING_STRATEGY] = |
| 261 | options.paddingStrategy; |
| 262 | } |
| 263 | if (typeof options.maxHeaderListPairs === 'number') { |
| 264 | flags |= (1 << IDX_OPTIONS_MAX_HEADER_LIST_PAIRS); |
| 265 | optionsBuffer[IDX_OPTIONS_MAX_HEADER_LIST_PAIRS] = |
| 266 | options.maxHeaderListPairs; |
| 267 | } |
| 268 | if (typeof options.maxOutstandingPings === 'number') { |
| 269 | flags |= (1 << IDX_OPTIONS_MAX_OUTSTANDING_PINGS); |
| 270 | optionsBuffer[IDX_OPTIONS_MAX_OUTSTANDING_PINGS] = |
| 271 | options.maxOutstandingPings; |
| 272 | } |
| 273 | if (typeof options.maxOutstandingSettings === 'number') { |
| 274 | flags |= (1 << IDX_OPTIONS_MAX_OUTSTANDING_SETTINGS); |
| 275 | optionsBuffer[IDX_OPTIONS_MAX_OUTSTANDING_SETTINGS] = |
| 276 | MathMax(1, options.maxOutstandingSettings); |
| 277 | } |
| 278 | if (typeof options.maxSessionMemory === 'number') { |
| 279 | flags |= (1 << IDX_OPTIONS_MAX_SESSION_MEMORY); |
| 280 | optionsBuffer[IDX_OPTIONS_MAX_SESSION_MEMORY] = |
| 281 | MathMax(1, options.maxSessionMemory); |
| 282 | } |
| 283 | if (typeof options.maxSettings === 'number') { |
| 284 | flags |= (1 << IDX_OPTIONS_MAX_SETTINGS); |
| 285 | optionsBuffer[IDX_OPTIONS_MAX_SETTINGS] = |
| 286 | MathMax(1, options.maxSettings); |
| 287 | } |
| 288 | if (typeof options.streamResetRate === 'number') { |
| 289 | flags |= (1 << IDX_OPTIONS_STREAM_RESET_RATE); |
| 290 | optionsBuffer[IDX_OPTIONS_STREAM_RESET_RATE] = |
| 291 | MathMax(1, options.streamResetRate); |
| 292 | } |
| 293 | if (typeof options.streamResetBurst === 'number') { |
no outgoing calls
no test coverage detected
searching dependent graphs…