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

Method ResumptionState

ticket.go:412–417  ·  view source on GitHub ↗

ResumptionState returns the session ticket sent by the server (also known as the session's identity) and the state necessary to resume this session. It can be called by [ClientSessionCache.Put] to serialize (with [SessionState.Bytes]) and store the session.

()

Source from the content-addressed store, hash-verified

410// It can be called by [ClientSessionCache.Put] to serialize (with
411// [SessionState.Bytes]) and store the session.
412func (cs *ClientSessionState) ResumptionState() (ticket []byte, state *SessionState, err error) {
413 if cs == nil || cs.session == nil {
414 return nil, nil, nil
415 }
416 return cs.session.ticket, cs.session, nil
417}
418
419// NewResumptionState returns a state value that can be returned by
420// [ClientSessionCache.Get] to resume a previous session.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected