mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-05 21:17:35 +03:00
crypto: add available godoc link
Change-Id: Ifc669399dde7d6229c6ccdbe29611ed1f8698fb1 Reviewed-on: https://go-review.googlesource.com/c/go/+/534778 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
9fc13bee9f
commit
59d4a9c7c4
6 changed files with 37 additions and 37 deletions
12
quic.go
12
quic.go
|
@ -46,7 +46,7 @@ type QUICConn struct {
|
|||
sessionTicketSent bool
|
||||
}
|
||||
|
||||
// A QUICConfig configures a QUICConn.
|
||||
// A QUICConfig configures a [QUICConn].
|
||||
type QUICConfig struct {
|
||||
TLSConfig *Config
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ func newQUICConn(conn *Conn) *QUICConn {
|
|||
}
|
||||
|
||||
// Start starts the client or server handshake protocol.
|
||||
// It may produce connection events, which may be read with NextEvent.
|
||||
// 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 {
|
||||
|
@ -182,7 +182,7 @@ 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.
|
||||
// It returns an event with a Kind of [QUICNoEvent] when no events are available.
|
||||
func (q *QUICConn) NextEvent() QUICEvent {
|
||||
qs := q.conn.quic
|
||||
if last := qs.nextEvent - 1; last >= 0 && len(qs.events[last].Data) > 0 {
|
||||
|
@ -214,7 +214,7 @@ func (q *QUICConn) Close() error {
|
|||
}
|
||||
|
||||
// HandleData handles handshake bytes received from the peer.
|
||||
// It may produce connection events, which may be read with NextEvent.
|
||||
// It may produce connection events, which may be read with [QUICConn.NextEvent].
|
||||
func (q *QUICConn) HandleData(level QUICEncryptionLevel, data []byte) error {
|
||||
c := q.conn
|
||||
if c.in.level != level {
|
||||
|
@ -258,7 +258,7 @@ type QUICSessionTicketOptions struct {
|
|||
}
|
||||
|
||||
// SendSessionTicket sends a session ticket to the client.
|
||||
// It produces connection events, which may be read with NextEvent.
|
||||
// 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 {
|
||||
c := q.conn
|
||||
|
@ -283,7 +283,7 @@ 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.
|
||||
// receiving the client's transport parameters. See [QUICTransportParametersRequired].
|
||||
func (q *QUICConn) SetTransportParameters(params []byte) {
|
||||
if params == nil {
|
||||
params = []byte{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue