go/src/crypto/tls/quic.go

type QUICEncryptionLevel

const QUICEncryptionLevelInitial

const QUICEncryptionLevelEarly

const QUICEncryptionLevelHandshake

const QUICEncryptionLevelApplication

func (l QUICEncryptionLevel) String() string {}

type QUICConn

type QUICConfig

type QUICEventKind

const QUICNoEvent

const QUICSetReadSecret

const QUICSetWriteSecret

const QUICWriteData

const QUICTransportParameters

const QUICTransportParametersRequired

const QUICRejectedEarlyData

const QUICHandshakeDone

const QUICResumeSession

const QUICStoreSession

type QUICEvent

type quicState

// QUICClient returns a new TLS client side connection using QUICTransport as the
// underlying transport. The config cannot be nil.
//
// The config's MinVersion must be at least TLS 1.3.
func QUICClient(config *QUICConfig) *QUICConn {}

// QUICServer returns a new TLS server side connection using QUICTransport as the
// underlying transport. The config cannot be nil.
//
// The config's MinVersion must be at least TLS 1.3.
func QUICServer(config *QUICConfig) *QUICConn {}

func newQUICConn(conn *Conn, config *QUICConfig) *QUICConn {}

// Start starts the client or server handshake protocol.
// It may produce connection events, which may be read with [QUICConn.NextEvent].
//
// Start must be called at most once.
func (q *QUICConn) Start(ctx context.Context) error {}

// NextEvent returns the next event occurring on the connection.
// It returns an event with a Kind of [QUICNoEvent] when no events are available.
func (q *QUICConn) NextEvent() QUICEvent {}

// Close closes the connection and stops any in-progress handshake.
func (q *QUICConn) Close() error {}

// HandleData handles handshake bytes received from the peer.
// It may produce connection events, which may be read with [QUICConn.NextEvent].
func (q *QUICConn) HandleData(level QUICEncryptionLevel, data []byte) error {}

type QUICSessionTicketOptions

// SendSessionTicket sends a session ticket to the client.
// It produces connection events, which may be read with [QUICConn.NextEvent].
// Currently, it can only be called once.
func (q *QUICConn) SendSessionTicket(opts QUICSessionTicketOptions) error {}

// StoreSession stores a session previously received in a QUICStoreSession event
// in the ClientSessionCache.
// The application may process additional events or modify the SessionState
// before storing the session.
func (q *QUICConn) StoreSession(session *SessionState) error {}

// ConnectionState returns basic TLS details about the connection.
func (q *QUICConn) ConnectionState() ConnectionState {}

// SetTransportParameters sets the transport parameters to send to the peer.
//
// Server connections may delay setting the transport parameters until after
// receiving the client's transport parameters. See [QUICTransportParametersRequired].
func (q *QUICConn) SetTransportParameters(params []byte) {}

// quicError ensures err is an AlertError.
// If err is not already, quicError wraps it with alertInternalError.
func quicError(err error) error {}

func (c *Conn) quicReadHandshakeBytes(n int) error {}

func (c *Conn) quicSetReadSecret(level QUICEncryptionLevel, suite uint16, secret []byte) {}

func (c *Conn) quicSetWriteSecret(level QUICEncryptionLevel, suite uint16, secret []byte) {}

func (c *Conn) quicWriteCryptoData(level QUICEncryptionLevel, data []byte) {}

func (c *Conn) quicResumeSession(session *SessionState) error {}

func (c *Conn) quicStoreSession(session *SessionState) {}

func (c *Conn) quicSetTransportParameters(params []byte) {}

func (c *Conn) quicGetTransportParameters() ([]byte, error) {}

func (c *Conn) quicHandshakeComplete() {}

func (c *Conn) quicRejectedEarlyData() {}

// quicWaitForSignal notifies the QUICConn that handshake progress is blocked,
// and waits for a signal that the handshake should proceed.
//
// The handshake may become blocked waiting for handshake bytes
// or for the user to provide transport parameters.
func (c *Conn) quicWaitForSignal() error {}