MCPcopy
hub / github.com/PatchMon/PatchMon / Get

Method Get

server-source-code/internal/rdpproxy/session.go:399–407  ·  view source on GitHub ↗

Get returns the session and port for a session ID. Used by DoConnect to get proxy port.

(sessionID string)

Source from the content-addressed store, hash-verified

397
398// Get returns the session and port for a session ID. Used by DoConnect to get proxy port.
399func (s *Sessions) Get(sessionID string) (port int, ok bool) {
400 s.mu.RLock()
401 sess, ok := s.sessions[sessionID]
402 s.mu.RUnlock()
403 if !ok {
404 return 0, false
405 }
406 return sess.Port, true
407}
408
409// Delete removes a session (e.g. when ticket is consumed and tunnel is done).
410func (s *Sessions) Delete(sessionID string) {

Callers 15

GetBufferFunction · 0.45
GetByteSliceFunction · 0.45
GetUpdateIntervalMethod · 0.45
GetIntegrationStatusMethod · 0.45
GetSSGVersionMethod · 0.45
DownloadSSGContentMethod · 0.45
IsDelayedCancelledFunction · 0.45
RequestIDFunction · 0.45
extractTokenFunction · 0.45
HSTSFunction · 0.45
rateLimitClientIPFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected