pkg crypto/tls, method (*QUICConn) ConnectionState() ConnectionState #44886
pkg crypto/tls, method (*QUICConn) HandleData(QUICEncryptionLevel, []uint8) error #44886
pkg crypto/tls, method (*QUICConn) NextEvent() QUICEvent #44886
-pkg crypto/tls, method (*QUICConn) SendSessionTicket(bool) error #60107
+pkg crypto/tls, method (*QUICConn) SendSessionTicket(QUICSessionTicketOptions) error #60107
+pkg crypto/tls, type QUICSessionTicketOptions struct #60107
+pkg crypto/tls, type QUICSessionTicketOptions struct, EarlyData bool #60107
pkg crypto/tls, method (*QUICConn) SetTransportParameters([]uint8) #44886
pkg crypto/tls, method (*QUICConn) Start(context.Context) error #44886
pkg crypto/tls, method (QUICEncryptionLevel) String() string #44886
return nil
}
+type QUICSessionTicketOptions struct {
+ // EarlyData specifies whether the ticket may be used for 0-RTT.
+ EarlyData bool
+}
+
// SendSessionTicket sends a session ticket to the client.
// It produces connection events, which may be read with NextEvent.
// Currently, it can only be called once.
-func (q *QUICConn) SendSessionTicket(earlyData bool) error {
+func (q *QUICConn) SendSessionTicket(opts QUICSessionTicketOptions) error {
c := q.conn
if !c.isHandshakeComplete.Load() {
return quicError(errors.New("tls: SendSessionTicket called before handshake completed"))
return quicError(errors.New("tls: SendSessionTicket called multiple times"))
}
q.sessionTicketSent = true
- return quicError(c.sendSessionTicket(earlyData))
+ return quicError(c.sendSessionTicket(opts.EarlyData))
}
// ConnectionState returns basic TLS details about the connection.
case QUICHandshakeDone:
a.complete = true
if a == srv {
- if err := srv.conn.SendSessionTicket(false); err != nil {
+ opts := QUICSessionTicketOptions{}
+ if err := srv.conn.SendSessionTicket(opts); err != nil {
return err
}
}