MCPcopy Create free account
hub / github.com/XTLS/Go / clientSessionCacheKey

Function clientSessionCacheKey

handshake_client.go:986–991  ·  view source on GitHub ↗

clientSessionCacheKey returns a key used to cache sessionTickets that could be used to resume previously negotiated TLS sessions with a server.

(serverAddr net.Addr, config *Config)

Source from the content-addressed store, hash-verified

984// clientSessionCacheKey returns a key used to cache sessionTickets that could
985// be used to resume previously negotiated TLS sessions with a server.
986func clientSessionCacheKey(serverAddr net.Addr, config *Config) string {
987 if len(config.ServerName) > 0 {
988 return config.ServerName
989 }
990 return serverAddr.String()
991}
992
993// hostnameInSNI converts name into an appropriate hostname for SNI.
994// Literal IP addresses and absolute FQDNs are not permitted as SNI values.

Callers 2

loadSessionMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…