fix metadata

This commit is contained in:
ginuerzh
2022-01-09 00:07:26 +08:00
parent f45dc93e92
commit 37e77bdce5
12 changed files with 118 additions and 159 deletions

View File

@ -1,9 +1,6 @@
package http2
import (
"net/http"
"time"
mdata "github.com/go-gost/gost/pkg/metadata"
)
@ -12,24 +9,12 @@ const (
)
type metadata struct {
path string
handshakeTimeout time.Duration
readHeaderTimeout time.Duration
readBufferSize int
writeBufferSize int
enableCompression bool
responseHeader http.Header
backlog int
backlog int
}
func (l *http2Listener) parseMetadata(md mdata.Metadata) (err error) {
const (
path = "path"
handshakeTimeout = "handshakeTimeout"
readHeaderTimeout = "readHeaderTimeout"
readBufferSize = "readBufferSize"
writeBufferSize = "writeBufferSize"
backlog = "backlog"
backlog = "backlog"
)
l.md.backlog = mdata.GetInt(md, backlog)