x/dialer/tls/metadata.go
2022-04-04 12:44:35 +08:00

23 lines
365 B
Go

package tls
import (
"time"
mdata "github.com/go-gost/core/metadata"
mdx "github.com/go-gost/x/metadata"
)
type metadata struct {
handshakeTimeout time.Duration
}
func (d *tlsDialer) parseMetadata(md mdata.Metadata) (err error) {
const (
handshakeTimeout = "handshakeTimeout"
)
d.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
return
}