make Config.Allow0RTT a bool, not a callback

This commit is contained in:
Marten Seemann 2023-03-22 13:25:09 +13:00
parent bc7cb706c5
commit 7a0ef5f867
10 changed files with 35 additions and 49 deletions

View file

@ -318,10 +318,8 @@ type Config struct {
// It has no effect for a client.
DisableVersionNegotiationPackets bool
// Allow0RTT allows the application to decide if a 0-RTT connection attempt should be accepted.
// When set, 0-RTT is enabled. When not set, 0-RTT is disabled.
// Only valid for the server.
// Warning: This API should not be considered stable and might change soon.
Allow0RTT func(net.Addr) bool
Allow0RTT bool
// Enable QUIC datagram support (RFC 9221).
EnableDatagrams bool
Tracer logging.Tracer