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

Function NewResumptionState

ticket.go:424–429  ·  view source on GitHub ↗

NewResumptionState returns a state value that can be returned by [ClientSessionCache.Get] to resume a previous session. state needs to be returned by [ParseSessionState], and the ticket and session state must have been returned by [ClientSessionState.ResumptionState].

(ticket []byte, state *SessionState)

Source from the content-addressed store, hash-verified

422// state needs to be returned by [ParseSessionState], and the ticket and session
423// state must have been returned by [ClientSessionState.ResumptionState].
424func NewResumptionState(ticket []byte, state *SessionState) (*ClientSessionState, error) {
425 state.ticket = ticket
426 return &ClientSessionState{
427 session: state,
428 }, nil
429}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…