MCPcopy Create free account
hub / github.com/XTLS/REALITY / Get

Method Get

common.go:1700–1709  ·  view source on GitHub ↗

Get returns the [ClientSessionState] value associated with a given key. It returns (nil, false) if no value is found.

(sessionKey string)

Source from the content-addressed store, hash-verified

1698// Get returns the [ClientSessionState] value associated with a given key. It
1699// returns (nil, false) if no value is found.
1700func (c *lruSessionCache) Get(sessionKey string) (*ClientSessionState, bool) {
1701 c.Lock()
1702 defer c.Unlock()
1703
1704 if elem, ok := c.m[sessionKey]; ok {
1705 c.q.MoveToFront(elem)
1706 return elem.Value.(*lruSessionCacheEntry).state, true
1707 }
1708 return nil, false
1709}
1710
1711var emptyConfig Config
1712

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected