CHANGELOG revision 4947ba95
12019-10-08 2 - 2.4.5 3 - [OPTIMIZATION]: flush encoder stream only when necessary. 4 - [BUGFIX] Use ls-qpack v0.10.2 for new API -- and for a bug fix. 5 - [BUGFIX] Typo in IETF conn SETTINGS writer. 6 - Use latest BoringSSL. 7 82019-10-08 9 - 2.4.4 10 - [API] Add lsquic_alpn2ver() to aid parsing Alt-Svc header. 11 - [BUGFIX] NULL dereference when H3 frame header would be split. 12 - [BUGFIX] Do not close fixed-size H3 frame prematurely. 13 - [BUGFIX] Allow PING frames in IETF mini conn. 14 - [BUGFIX] Mini conns: don't send any packets after receiving 15 CONNECTION_CLOSE. 16 - [BUGFIX] Client migration: reserve slot for DCID from transport params. 17 - [BUGFIX] Allow max_early_data_size=0 -- early_data might not be there. 18 - [BUGFIX] Use an invalid stream number to reset BPT cache (zero is now a 19 valid stream number). 20 - [SPEC] Use FINAL_SIZE_ERROR when FIN mismatch is detected. 21 - [OPTIMIZATION] Closed connection only gets one chance to send packets. 22 - [OPTIMIZATION] Flush headers stream before packetizing stream data. 23 - [OPTIMIZATION] process QPACK encoder STREAM frames immediately. 24 - Update ls-qpack to v0.10.1. 25 262019-09-30 27 - 2.4.3 28 - Add GQUIC versions to the list of h3 ALPNs for Alt-Svc header. 29 For example, h3-Q043. Chrome will switch to using this format at 30 some point in the future. 31 - [BUGFIX] Send correct value in max_streams_uni transport param 32 - [SPEC] Abort IETF QUIC connection if max_early_data_size is not set 33 to 0xFFFFFFFF 34 352019-09-23 36 - 2.4.2 37 - [BUGFIX] H3 framing: fix zero-byte write when space is available 38 - [BUGFIX] Don't send STREAM frame when incoming unidirectgional stream 39 is closed 40 - [BUGFIX] Cancel all pending writes by stream reset by a GOAWAY 41 - [BUGFIX] Fix use-after-free in IETF full conn 42 - [OPTIMIZATION] Wait for session tickets for two seconds and then drop 43 SSL object and crypto streams. 44 452019-09-18 46 - 2.4.0 47 - [FEATURE] QUIC and HTTP/3 Internet Draft 23 support 48 492019-09-13 50 - 2.3.1 51 - [BUGFIX] Fix memory leaks 52 - [BUGFIX] Fix unit tests 53 542019-09-12 55 - 2.3.0 56 - [FEATURE] BBR congestion control is on by default 57 - [BUGFIX] BBR app-limited logic 58 - [BUGFIX] Fix uninitialized warnings in IETF 59 - [BUGFIX] Update ls-qpack to v0.9.14 60 - [CLEANUP] Code cleanup 61 622019-09-11 63 - 2.2.0 64 - [FEATURE] Server code is included in the library 65 - [FEATURE] IETF QUIC and HTTP/3 Support (ID-22) 66 672019-05-13 68 - 1.21.2 69 - [OPTIMIZATION] HPACK: use history to improve compression performance 70 712019-05-06 72 - 1.21.1 73 - [BUGFIX] If FIN or RST not received, don't delay stream destruction. 74 - [OPTIMIZATION] Speed up HPACK encoder by using same hash value to 75 search static and dynamic tables. 76 772019-04-12 78 - 1.21.0 79 - [FEATURE] Add qlog log module. 80 812019-04-01 82 - 1.20.0 83 - [FEATURE] Add support for Q046. 84 852019-03-19 86 - 1.19.6 87 - [BUGFIX] Ensure that Largest Observed does not decrease in ACKs we 88 send. ACK frames placed in packets in buffered queues (optimization 89 introduced in 1.17.15) can be preceded by an ACK frame generated later. 90 In this case, the older ACK frame should not be sent out, as Chromium- 91 based servers flags decrease in the ACK frame's Largest Observed value 92 as an error. 93 942019-03-05 95 - 1.19.5 96 - [BUGFIX] Use correct public key from PUBS based on KEXS index. 97 - [BUGFIX] Check flags before dispatching writes, avoiding assert. 98 - [BUGFIX] Set :scheme to "https" (instead of "HTTP"). 99 1002019-02-25 101 - 1.19.4 102 - [BUGFIX] Check buffer bounds when looking up version in 0-RTT blob. 103 - [BUGFIX] http_client: don't fetch 0-rtt info if handshake failed. 104 - Log number of pacer calls at DEBUG, rather than NOTICE, level. 105 1062019-02-18 107 - 1.19.3 108 - [BUGFIX] Q044: don't encode packet number in 6 bytes. Six-byte 109 packet number encoding does not exist in Q044. This fixes a 110 regression introduced in '[BUGFIX] Buffered packets can contain 111 ACK frames' -- we need to keep QUIC version in mind when selecting 112 the longest possible packet number encoding used for the buffered 113 packet that carries the ACK. 114 - [BUGFIX] Do not increase CWND when timeout occurs. 115 - http_client: support setting handshake timeout on command line. 116 Use -o handshake_to=timeout. 117 - http_client: use -k to connect UDP socket to pick up ICMP errors. 118 - http_client: allow pathless mode, when only handshake is performed 119 without issuing any requests. This can be done by simply not 120 specifying a -p flag on the command line. 121 1222019-02-11 123 - 1.19.2 124 - [BUGFIX] Begin negotiation with version provided in 0-RTT info. 125 - [BUGFIX] Version checking in zero_rtt deserialize function. 126 1272019-02-04 128 - 1.19.1 129 - [BUGFIX] Fix Windows build. 130 1312019-02-04 132 - 1.19.0 133 - [FEATURE, API Change] 0-RTT support. Add function to export 0-RTT 134 information; it can be supplied to a subsequent connect() call. 135 - [FEATURE] Add -0 flag to http_client to exercise 0-RTT support. 136 - [BUGFIX] Resuscitate the Windows build. 137 - [BUGFIX] Send HTTP settings (max header list size) if necessary. 138 - [BUGFIX] Buffered packets can contain ACK frames. 139 - [BUGFIX] Make packet writeable once all STREAM frames are elided. 140 - [BUGFIX] Fix potential null dereference when realloc fails. 141 - cmake: simplify build configuration. 142 1432019-01-28 144 - 1.18.0 145 - [API Change] Can specify clock granularity in engine settings. 146 - [BUGFIX] Pacer uses fixed clock granularity. Since the change on 147 2018-04-09, it is not necessary to try to approximate the next tick 148 time in the pacer: it can use fix clock granularity specified by 149 the user. 150 - [BUGFIX] Do not tick constantly before handshake is done. 151 - [BUGFIX] Do not exit tick prematurely: reuse packet with ACK. Even 152 if we cannot allocate *more* packets, we could still be able to write 153 to one already allocated. 154 - [BUGFIX] Do not schedule pacer if there are no lost packets. 155 1562019-01-17 157 - 1.17.15 158 - [BUGFIX] http_client: make sure only one read per on_read() callback 159 is performed in the header conversion bypass (-B) mode. 160 - http_client: with -E, assign random priority when stream is created. 161 - [OPTIMIZATION] On immediate write, place an ACK frame into the first 162 buffered packet if an ACK is queued. This reduces the number of 163 standalone ACK packets. 164 - [OPTIMIZATION] Allow placing more than one STREAM frame from the same 165 stream into an outgoing packet. This change minimizes the number of 166 buffered packets required to store several small HTTP messages by 167 virtue of allowing more than one STREAM frame from HEADERS stream in 168 the same packet. 169 - [OPTIMIZATION] Flush headers when writing to buffered packets. This 170 causes the headers to be written to the same buffered packet queue, 171 thereby improving packet utilization, especially for small HTTP 172 messages. 173 1742019-01-16 175 - 1.17.14 176 - [FEATURE] http_client can now collect stats: time to connect, TTFB, 177 time to download, requests per seconds, and bandwidth. See -t flag. 178 - [BUGFIX] http_client: -B, -K, and -r can be used at the same time. 179 - [BUGFIX] http_client: do not display cert chain before each request. 180 Now this is only done once per connection, if the handshake is 181 successful and -a option is given. 182 - [BUGFIX] Do not wait to dispatch on_close() after reading. If a 183 stream is scheduled to be closed after on_read() callback returns, 184 close it immediately instead of waiting until the end of the tick. 185 If client creates new request from on_close() event, they will be 186 processed in the same tick instead of waiting for the next one. 187 - [BUGFIX] HEADERS stream is critical: always treat it with highest 188 priority. 189 1902019-01-10 191 - 1.17.12 192 - [FEATURE] http_client can now issue parallel requests in the context 193 of a single connection. See -w option. 194 1952019-01-03 196 - 1.17.11 197 - Fix strict aliasing warning in optimized compilation. 198 1992018-12-27 200 - 1.17.10 201 - Fix the example program to be able to use parallel connections 202 again. (See the -n argument.) 203 2042018-12-18 205 - 1.17.9 206 - [BUGFIX] Engine: reduce minimum batch size from 256 to 4 207 2082018-12-10 209 - 1.17.8 210 - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux 211 2122018-12-03 213 - 1.17.7 214 - [BUGFIX] Do not unset PING alarm before ringing expired alarms. 215 This prevented PING from ever being sent. 216 2172018-11-29 218 - 1.17.6 219 - Add failsafe: resume sending packets after some time 220 221 The change puts a 1-second limit on the amount of time the engine 222 will not send packets after some packets are delayed. This makes 223 the library robust in case the user does not unblock the engine 224 explicitly using lsquic_engine_send_unsent_packets() call. 225 226 - [BUGFIX] Handle corner cases in send controller when packets are 227 a) delayed or b) dropped during repackaging. 228 - [BUGFIX] Memory leak: destroy buffered packets during controller 229 cleanup. 230 2312018-11-16 232 - 1.17.3 233 - [BUGFIX] Do not send STOP_WAITING frames when using Q044 234 2352018-10-19 236 - 1.17.2 237 - [BUGFIX] Memory leak in test_frame_rw unit test. 238 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 239 flags. (Only a problem in unit tests -- benign otherwise.) 240 2412018-10-16 242 - 1.17.0 243 - [API Change] Packet out Memory Interface (PMI) update: 244 - Split PMI pool return into pmi_release and pmi_return 245 - PMI callbacks take peer_ctx and is_ipv6 arguments 246 - [BUGFIX] Fix use-after-free when certificate is updated 247 - Silence gcc warning in optimized mode by performing useless 248 initialization 249 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 250 DEVEL_MODE 251 2522018-10-03 253 - 1.16.0 254 - [API Change] Add lsquic_conn_n_avail_streams() 255 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 256 2572018-09-27 258 - 1.15.0 259 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 260 - [BUGFIX] free uncompressed headers correctly when error occurs 261 2622018-09-12 263 - 1.14.3 264 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 265 - [BUGFIX] Drop packets that would become empty due to repackaging. 266 Packets on the scheduled queue may be marked for repackaging. 267 Frames such as ACK frame that are never resent are removed from 268 repackaged packets. We must check that the newly repackaged packet 269 would not be empty. If it would be, it is destroyed instead and 270 the next packet on the scheduled queue is used. Note that this 271 change only affects the logic to return the next packet to be sent. 272 Lost packets that are being rescheduled are already processed in 273 this fashion. 274 - Byteswap CID before logging it - this makes it match Chrome CIDs. 275 (Except Q035, which is the last little-endian GQUIC version we 276 support.) 277 2782018-09-06 279 - 1.14.0 280 - [API Change] Disable packet sending if full batch cannot be sent 281 If lsquic_packets_out_f() cannot send the whole batch, disable 282 packet sending until lsquic_engine_send_unsent_packets() is called. 283 - [BUGFIX] Handle case when STREAM frame does not fit. 284 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 285 may send overlapping STREAM frames even if using versions older 286 than Q043. 287 - Custom header set fixes: 288 - set "FIN reached" flag when custom header with FIN flag is 289 claimed; 290 - do not return custom header set for a reset stream. 291 2922018-08-27 293 294 - 1.13.0 295 - [FEATURE, API Change] Add ability to create custom header set 296 objects via callbacks. This avoids reading and re-parsing 297 headers from the stream. 298 2992018-08-27 300 301 - 1.12.4 302 - Fix memory leak when engine is destroyed 303 - Fix memory leak in http_client 304 - Fix gcc warning in unit tests 305 3062018-08-22 307 308 - 1.12.3 309 - [BUGFIX] Fix duplicate STREAM frame detection 310 3112018-08-20 312 313 - 1.12.2 314 - [BUGFIX] Update count of scheduled bytes when adjusting size of 315 an already-scheduled packet. 316 - Emit info instead of warning messages when stream is used in 317 unexpected ways. 318 3192018-08-17 320 321 - 1.12.0 322 - [FEATURE, API Change] Add support for certificate verification 323 3242018-08-16 325 326 - 1.11.1 327 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 328 3292018-08-15 330 331 - 1.11.0 332 - [FEATURE] Add support for Q044. 333 3342018-08-09 335 336 - 1.10.2 337 - [BUGFIX] Don't go over limit when creating delayed streams 338 3392018-07-10 340 341 - 1.10.1 342 - [BUGFIX] process connections after each batch of packets is read 343 This avoids a problem of accumulating a very large list of packets 344 (possible when speeds are high and socket's receive buffer is large) 345 and processing it all at once. 346 - If glibc is older than 2.17, link with rt. This is necessary for 347 clock_getres(2). 348 - Add version macros to lsquic.h; remove unnecessary includes. 349 3502018-06-13 351 352 - [BUGFIX] allow multiple parallel connections by default 353 354 Use the original method of tracking connections by CIDs by default. 355 If zero-sized CID support is turned on, connections are tracked by 356 the address. A new connection is not created if another connection 357 is using the same network address 358 3592018-05-30 360 361 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 362 3632018-05-24 364 365 - Close connection properly when packet encryption fails 366 3672018-05-23 368 369 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 370 3712018-05-21 372 373 - [API Change] Add optional callback to call when handshake is done 374 - [API Change, BUGFIX] After send failure, wait until transport available 375 3762018-05-18 377 378 - [API] Expose useful lsquic_ver2str[] in lsquic.h 379 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 380 - Improve checks of number of incoming streams limit and associated 381 error reporting. 382 - [BUGFIX] Command-line option `-6` now works correctly. 383 3842018-05-16 385 386 - [FEATURE] DNS resolution 387 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 388 - http_client: fix priority range generated by -E flag 389 3902018-05-09 391 392 - [FEATURE] Add support for Q043. 393 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 394 - Fix typo in debug message. 395 - Fix code indentation. 396 - Add /* fallthru */ comment to stop newer gcc from complaining. 397 - Logger: fix compilation of optimized Windows build. 398 3992018-05-04 400 401 - [FEATURE] Add support for Q042. 402 - Remove comment: MSPC is obsolete (no code changes) 403 - Prog: use lsquic_str2ver() when processing -o version flag 404 - Remove unused CTIM and SRBF transport parameters 405 - Disable QUIC versions Q037 and Q038 by default 406 - Fix Windows compilation by including compat header file in 407 lshpack.c 408 - Address warnings produced by newer versions of gcc 409 - Future-proof: turn off -Werror 410 4112018-05-02 412 413 - [BUGFIX] Make lsquic_conn_quic_version() available 414 - Switch to using ls-hpack 1.1 415 - [BUGFIX] Do not ignore stream resets after receiving FIN 416 4172018-04-27 418 419 - HPACK: do not allow header block to end with table size update. 420 4212018-04-25 422 423 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 424 packets. 425 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 426 - [BUGFIX] connections with blocked scheduled packets are not tickable 427 for sending. 428 - [BUGFIX] Conn is tickable if it wants to send a connection-level 429 frame. 430 4312018-04-23 432 433 - Fix busy loop: tickable must make progress. When connection is 434 self-reporting as tickable, it must make progress when ticked. There 435 are two issues: 436 1. If there are buffered packets, the connection is only tickable if 437 they can be sent out. 438 2. A connection is tickable if there are streams on the servicing 439 queue. When the tick occurs, we must service the stream 440 independent of whether any packets are sent. 441 - Fix assertion in pacer which can be incorrect under some 442 conditions. 443 - cmake: do not turn on address sanitizer if in Travis. 444 4452018-04-20 446 447 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 448 changes. 449 4502018-04-19 451 452 - [BUGFIX] Add connection to Tickable Queue on stream write 453 - cmake: use MSVC variable instead of trying to detect 454 - engine: improve connection incref/decref logging 455 - stream: don't ignore errors that may occur on triggered flush 456 - connection: remove obsolete method 457 - engine: indicate connection as tickable if previous call went 458 over threshold 459 4602018-04-09 461 462 [API Change, OPTIMIZATION] Only process conns that need to be processed 463 464 The API is simplified: do not expose the user code to several 465 queues. A "connection queue" is now an internal concept. 466 The user processes connections using the single function 467 lsquic_engine_process_conns(). When this function is called, 468 only those connections are processed that need to be processed. 469 A connection needs to be processed when: 470 471 1. New incoming packets have been fed to the connection. 472 2. User wants to read from a stream that is readable. 473 3. User wants to write to a stream that is writeable. 474 4. There are buffered packets that can be sent out. (This 475 means that the user wrote to a stream outside of the 476 lsquic library callback.) 477 5. A control frame (such as BLOCKED) needs to be sent out. 478 6. A stream needs to be serviced or delayed stream needs to 479 be created. 480 7. An alarm rings. 481 8. Pacer timer expires. 482 483 To achieve this, the library places the connections into two 484 priority queues (min heaps): 485 486 1. Tickable Queue; and 487 2. Advisory Tick Time queue (ATTQ). 488 489 Each time lsquic_engine_process_conns() is called, the Tickable 490 Queue is emptied. After the connections have been ticked, they are 491 queried again: if a connection is not being closed, it is placed 492 either in the Tickable Queue if it is ready to be ticked again or 493 it is placed in the Advisory Tick Time Queue. It is assumed that 494 a connection always has at least one timer set (the idle alarm). 495 496 The connections in the Tickable Queue are arranged in the least 497 recently ticked order. This lets connections that have been quiet 498 longer to get their packets scheduled first. 499 500 This change means that the library no longer needs to be ticked 501 periodically. The user code can query the library when is the 502 next tick event and schedule it exactly. When connections are 503 processed, only the tickable connections are processed, not *all* 504 the connections. When there are no tick events, it means that no 505 timer event is necessary -- only the file descriptor READ event 506 is active. 507 508 The following are improvements and simplifications that have 509 been triggered: 510 511 - Queue of connections with incoming packets is gone. 512 - "Pending Read/Write Events" Queue is gone (along with its 513 history and progress checks). This queue has become the 514 Tickable Queue. 515 - The connection hash no longer needs to track the connection 516 insertion order. 517 5182018-04-02 519 520 - [FEATURE] Windows support 521 522 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 523 5242018-03-09 525 526 - [OPTIMIZATION] Merge series of ACKs if possible 527 528 Parsed single-range ACK frames (that is the majority of frames) are 529 saved in the connection and their processing is deferred until the 530 connection is ticked. If several ACKs come in a series between 531 adjacent ticks, we check whether the latest ACK is a strict superset 532 of the saved ACK. If it is, the older ACK is not processed. 533 534 If ACK frames can be merged, they are merged and only one of them is 535 either processed or saved. 536 537 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 538 539 Never generate a gap in the sent packet number sequence. This reduces 540 the send history to a single number instead of potentially a series of 541 packet ranges and thereby speeds up ACK verification. 542 543 By default, detecting a gap in the send history is not fatal: only a 544 single warning is generated per connection. The connection can continue 545 to operate even if the ACK verification code is not able to detect some 546 inconsistencies. 547 548 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 549 550 The first part of struct lsquic_send_ctl now consists of members that 551 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 552 which is the normal case). To speed up reads and writes, we no longer 553 try to save space by using 8- and 16-bit integers. Use regular integer 554 width for everything. 555 556 - [OPTIMIZATION] Cache size of sent packet. 557 558 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 559 560 Instead of parsing our own ACK frames when packet has been acked, 561 use the value saved in the packet_out structure when the ACK frame 562 was generated. 563 564 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 565 566 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 567 568 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 569 570 - Fix: http_client: fix -I flag; switch assert() to abort() 571 5722018-02-26 573 - [API Change] lsquic_engine_connect() returns pointer to the connection 574 object. 575 - [API Change] Add lsquic_conn_get_engine() to get engine object from 576 connection object. 577 - [API Change] Add lsquic_conn_status() to query connection status. 578 - [API Change] Add add lsquic_conn_set_ctx(). 579 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 580 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 581 arrives. 582 - [OPTIMIZATION] Do not compile expensive send controller sanity check 583 by default. 584 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 585 - [OPTIMIZATION] Only make squeeze function call if necessary. 586 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 587 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 588 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 589 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 590 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 591 ordered. 592 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 593 - Fix: reset incoming streams that arrive after we send GOAWAY. 594 - Fix: delay client on_new_conn() call until connection is fully set up. 595 - Fixes to buffered packets logic: splitting, STREAM frame elision. 596 - Fix: do not dispatch on_write callback if no packets are available. 597 - Fix WINDOW_UPDATE send and resend logic. 598 - Fix STREAM frame extension code. 599 - Fix: Drop unflushed data when stream is reset. 600 - Switch to tracking CWND using bytes rather than packets. 601 - Fix TCP friendly adjustment in cubic. 602 - Fix: do not generate invalid STOP_WAITING frames during high packet 603 loss. 604 - Pacer fixes. 605 6062017-12-18 607 608 - Fix: better follow cubic curve after idle period 609 - Fix: add missing parts to outgoing packet splitting code 610 - Fix: compilation using gcc 4.8.4 611 6122017-10-31 613 614 - Add APIs.txt -- describes LSQUIC APIs 615 6162017-10-31 617 618 - [API Change] Sendfile-like functionality is gone. The stream no 619 longer opens files and deals with file descriptors. (Among other 620 things, this makes the code more portable.) Three writing functions 621 are provided: 622 623 lsquic_stream_write 624 lsquic_stream_writev 625 lsquic_stream_writef (NEW) 626 627 lsquic_stream_writef() is given an abstract reader that has function 628 pointers for size() and read() functions which the user can implement. 629 This is the most flexible way. lsquic_stream_write() and 630 lsquic_stream_writev() are now both implemented as wrappers around 631 lsquic_stream_writef(). 632 633 - [OPTIMIZATION] When writing to stream, be it within or without the 634 on_write() callback, place data directly into packet buffer, 635 bypassing auxiliary data structures. This reduces amount of memory 636 required, for the amount of data that can be written is limited 637 by the congestion window. 638 639 To support writes outside the on_write() callback, we keep N 640 outgoing packet buffers per connection which can be written to 641 by any stream. One half of these are reserved for the highest 642 priority stream(s), the other half for all other streams. This way, 643 low-priority streams cannot write instead of high-priority streams 644 and, on the other hand, low-priority streams get a chance to send 645 their packets out. 646 647 The algorithm is as follows: 648 649 - When user writes to stream outside of the callback: 650 - If this is the highest priority stream, place it onto the 651 reserved N/2 queue or fail. 652 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 653 rather than N/2, allowing high-priority streams to write as 654 much as can be sent.) 655 - If the stream is not the highest priority, try to place the 656 data onto the reserved N/2 queue or fail. 657 - When tick occurs *and* more packets can be scheduled: 658 - Transfer packets from the high N/2 queue to the scheduled 659 queue. 660 - If more scheduling is allowed: 661 - Call on_write callbacks for highest-priority streams, 662 placing resulting packets directly onto the scheduled queue. 663 - If more scheduling is allowed: 664 - Transfer packets from the low N/2 queue to the scheduled 665 queue. 666 - If more scheduling is allowed: 667 - Call on_write callbacks for non-highest-priority streams, 668 placing resulting packets directly onto the scheduled queue 669 670 The number N is currently 20, but it could be varied based on 671 resource usage. 672 673 - If stream is created due to incoming headers, make headers readable 674 from on_new. 675 676 - Outgoing packets are no longer marked non-writeable to prevent placing 677 more than one STREAM frame from the same stream into a single packet. 678 This property is maintained via code flow and an explicit check. 679 Packets for stream data are allocated using a special function. 680 681 - STREAM frame elision is cheaper, as we only perform it if a reset 682 stream has outgoing packets referencing it. 683 684 - lsquic_packet_out_t is smaller, as stream_rec elements are now 685 inside a union. 686 6872017-10-12 688 689 - Do not send RST_STREAM when stream is closed for reading 690 - Raise maximum header size from 4K to 64K 691 - Check header name and value lengths against maximum imposed by HPACK 692 - Fix NULL dereference in stream flow controller 693 6942017-10-09 695 696 - Hide handshake implementation behind a set of function pointers 697 - Use monotonically increasing clock 698 - Make sure that retx delay is not larger than the max of 60 seconds 699 7002017-09-29 701 702 - A few fixes to code and README 703 7042017-09-28 705 706 - Add support for Q041; drop support for Q040 707 7082017-09-27 709 710 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 711 7122017-09-26 713 714 - Add support for Mac OS 715 - Add support for Raspberry Pi 716 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 717 7182017-09-22 719 720 - Initial release 721