refactor how session tickets are sent

Previously, RunHandshake() would send the session tickets. Now, the
session initiates the sending of the session ticket. This simplifies the
setup a bit, and it will make it possible to include the RTT estimate in
the session ticket without accessing the RTTStats concurrently.
This commit is contained in:
Marten Seemann
2020-02-02 13:45:52 +07:00
parent 3e32a693ad
commit 8cde4ab638
9 changed files with 103 additions and 140 deletions

View File

@@ -72,6 +72,7 @@ type CryptoSetup interface {
RunHandshake()
io.Closer
ChangeConnectionID(protocol.ConnectionID)
GetSessionTicket() ([]byte, error)
HandleMessage([]byte, protocol.EncryptionLevel) bool
SetLargest1RTTAcked(protocol.PacketNumber)