* enable DPLPMTUD on macOS dual-stack sockets
https://datatracker.ietf.org/doc/draft-seemann-tsvwg-udp-fragmentation/
contains details on how IP fragmentation is handled on different
platforms.
* only enable DF on macOS Sequoia (and newer) dual-stack sockets
* fix macOS version numbers
* fix comment in MTU integration test
* skip dual-stack test on old macOS versions
* http3: rename RoundTripper to Transport
* http3: rename SingleDestinationRoundTripper to ClientConn
* http3: construct the ClientConn via Transport.NewClientConn
* send goaway when server is shutting down
* http3: track next stream ID instead of last stream ID for GOAWAYs
* refactor the graceful shutdown integration tests
* http3: improve GOAWAY frame parsing tests
* http3: simplify server graceful shutdown logic
* http3: simplify parsing of GOAWAY frames
* http3: clean up initialization of server contexts
* http3: fix race condition in graceful shutdown logic
---------
Co-authored-by: WeidiDeng <weidi_deng@icloud.com>
* http3: implement server idle timeout support
This update introduces the ability for an HTTP/3 server to enforce an idle
timeout on connections. This timeout will trigger when no new requests are
received on a connection, irrespective of any PING frames received at the
QUIC level.
* fix deadlock when http3 idle timeout is not enabled
* fix typo
* Switch to a more efficient implementation
* Avoid a goroutine
* Avoid constent re-adjusting of a timer
* Works with hijacked streams
* Generalize the idle timeout description
* Add an integration test for http server idle timeout
* Attempt to fix other tests impacted by the new idle timeout test
* pass a context to Transport.ConnContext
This context is cancelled when the QUIC connection is closed, or when
the QUIC handshake fails. This allows the application to easily build
and garbage collect a map of active connections.
* correctly handle fresh contexts returned from ConnContext
This is more useful than the maximum frame size. The user of the library
shouldn't have to care about the QUIC framing layer.
---------
Co-authored-by: 世界 <i@sekai.icu>
Currently the HTTPStreamer is implemented on the http.Request.Body. This
complicates usage, since it's not easily possible to flush the HTTP
header, requiring users to manually flash the header before taking over
the stream.
With this change, the HTTP header is now flushed automatically as soon
as HTTPStream is called.
The stream exposes two methods required for doing an HTTP request:
SendRequestHeader and ReadResponse. This can be used by applications
that wish to use the stream for non-HTTP content afterwards. This will
lead to a simplification in the API we need to expose for WebTransport,
and will make it easier to send HTTP Datagrams associated with this
stream.
The http.Request.Body can be type-asserted to a http3.Settingser. The
Settings method on this interface blocks until the client's SETTINGS
frame has been received.