MCPcopy
hub / github.com/XTLS/REALITY / StoreSession

Method StoreSession

quic.go:323–335  ·  view source on GitHub ↗

StoreSession stores a session previously received in a QUICStoreSession event in the ClientSessionCache. The application may process additional events or modify the SessionState before storing the session.

(session *SessionState)

Source from the content-addressed store, hash-verified

321// The application may process additional events or modify the SessionState
322// before storing the session.
323func (q *QUICConn) StoreSession(session *SessionState) error {
324 c := q.conn
325 if !c.isClient {
326 return quicError(errors.New("tls: StoreSessionTicket called on the server"))
327 }
328 cacheKey := c.clientSessionCacheKey()
329 if cacheKey == "" {
330 return nil
331 }
332 cs := &ClientSessionState{session: session}
333 c.config.ClientSessionCache.Put(cacheKey, cs)
334 return nil
335}
336
337// ConnectionState returns basic TLS details about the connection.
338func (q *QUICConn) ConnectionState() ConnectionState {

Callers

nothing calls this directly

Calls 3

quicErrorFunction · 0.85
clientSessionCacheKeyMethod · 0.80
PutMethod · 0.65

Tested by

no test coverage detected