implement HTTP/3

This commit is contained in:
Marten Seemann
2019-03-11 15:06:23 +09:00
parent 1325909ab7
commit 4f6d0e651a
43 changed files with 2511 additions and 2540 deletions

View File

@@ -8,7 +8,7 @@ import (
"net/http"
"sync"
"github.com/lucas-clemente/quic-go/h2quic"
"github.com/lucas-clemente/quic-go/http3"
"github.com/lucas-clemente/quic-go/internal/testdata"
"github.com/lucas-clemente/quic-go/internal/utils"
)
@@ -28,7 +28,7 @@ func main() {
}
logger.SetLogTimeFormat("")
roundTripper := &h2quic.RoundTripper{
roundTripper := &http3.RoundTripper{
TLSClientConfig: &tls.Config{
RootCAs: testdata.GetRootCA(),
},

View File

@@ -15,7 +15,7 @@ import (
_ "net/http/pprof"
"github.com/lucas-clemente/quic-go/h2quic"
"github.com/lucas-clemente/quic-go/http3"
"github.com/lucas-clemente/quic-go/internal/testdata"
"github.com/lucas-clemente/quic-go/internal/utils"
)
@@ -135,9 +135,9 @@ func main() {
var err error
if *tcp {
certFile, keyFile := testdata.GetCertificatePaths()
err = h2quic.ListenAndServe(bCap, certFile, keyFile, nil)
err = http3.ListenAndServe(bCap, certFile, keyFile, nil)
} else {
server := h2quic.Server{
server := http3.Server{
Server: &http.Server{Addr: bCap},
}
err = server.ListenAndServeTLS(testdata.GetCertificatePaths())