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)
| 321 | // The application may process additional events or modify the SessionState |
| 322 | // before storing the session. |
| 323 | func (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. |
| 338 | func (q *QUICConn) ConnectionState() ConnectionState { |
nothing calls this directly
no test coverage detected