This commit removes use_retry from the server config and provides a
public API for the user to manually accept/refuse/retry incoming
connections before a handshake begins, and inspect properties such as
an incoming connection's remote address and whether that address is
validated when doing so.
In quinn-proto, Incoming is made public, as well as Endpoint's accept/
refuse/retry methods which operate on it. The
DatagramEvent::NewConnection event is modified to return an incoming
but not yet accepted connection.
In quinn, awaiting Endpoint::accept now yields a new
quinn::Incoming type, rather than quinn::Connecting. The new
quinn::Incoming type has all the methods its quinn_proto equivalent has,
as well as an accept method to (fallibly) transition it into a
Connecting, and also refuse, retry, and ignore methods.
Furthermore, quinn::Incoming implements IntoFuture with the output type
Result<Connection, ConnectionError>>, which is the same as the Future
output type of Connecting. This lets server code which was
straightforwardly awaiting the result of quinn::Endpoint::accept work
with little to no modification.
The test accept_after_close was removed because the functionality it
was testing for no longer exists.
encryption / decryption. It can be enabled using --no-protection
command line option. This can be use when doing performance
tests to reveal other hotspots than packet encryption and
decryption.
Users found it rather confusing that binding to the default address
(::0) doesn't allow incoming connections via IPv4 on windows.
This change will allow for this, by using a IPv6 socket and
disabling IPv6-only on all platforms. This lets the windows and unix
implementations behave equally.
The executable names conflicted with the interop server:
> The bin target `server` in package `perf v0.1.0 (C:\Users\matth\Code\rust\quinn\perf)` has the same output filename as the bin target `server` in package `interop v0.1.0 (C:\Users\matth\Code\rust\quinn\interop)`.
> Colliding filename is: C:\Users\matth\Code\rust\quinn\target\debug\server.pdb
> The targets should have unique names.