Skip to content

Commit

Permalink
add comments for http3 roundtriper
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Jul 6, 2022
1 parent 21baa4c commit 7eb9617
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/http3/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
return r.RoundTripOpt(req, RoundTripOpt{})
}

// RoundTripOnlyCachedConn round trip only cached conn.
func (r *RoundTripper) RoundTripOnlyCachedConn(req *http.Request) (*http.Response, error) {
return r.RoundTripOpt(req, RoundTripOpt{OnlyCachedConn: true})
}

// AddConn add a http3 connection, dial new conn if not exists.
func (r *RoundTripper) AddConn(addr string) error {
c, err := r.getClient(addr, false)
if err != nil {
Expand Down

0 comments on commit 7eb9617

Please sign in to comment.