MCPcopy
hub / github.com/cloudflare/cloudflared / RegisterSession

Method RegisterSession

quic/v3/manager.go:30–30  ·  view source on GitHub ↗

RegisterSession will register a new session if it does not already exist for the request ID. During new session creation, the session will also bind the UDP socket for the origin. If the session exists for a different connection, it will return [ErrSessionBoundToOtherConn].

(request *UDPSessionRegistrationDatagram, conn DatagramConn)

Source from the content-addressed store, hash-verified

28 // During new session creation, the session will also bind the UDP socket for the origin.
29 // If the session exists for a different connection, it will return [ErrSessionBoundToOtherConn].
30 RegisterSession(request *UDPSessionRegistrationDatagram, conn DatagramConn) (Session, error)
31 // GetSession returns an active session if available for the provided connection.
32 // If the session does not exist, it will return [ErrSessionNotFound]. If the session exists for a different
33 // connection, it will return [ErrSessionBoundToOtherConn].

Callers 5

TestRegisterSessionFunction · 0.95
RegisterUdpSessionMethod · 0.65
serveSessionFunction · 0.65

Calls

no outgoing calls

Tested by 3

TestRegisterSessionFunction · 0.76
serveSessionFunction · 0.52