MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / activityFor

Method activityFor

internal/exit/exit.go:902–911  ·  view source on GitHub ↗

activityFor returns owner's wake channel, lazily allocating it on first use. Channels are kept for the life of the server; with a small number of distinct clients per server this is fine.

(owner [frame.ClientIDLen]byte)

Source from the content-addressed store, hash-verified

900// use. Channels are kept for the life of the server; with a small number of
901// distinct clients per server this is fine.
902func (s *Server) activityFor(owner [frame.ClientIDLen]byte) chan struct{} {
903 s.mu.Lock()
904 defer s.mu.Unlock()
905 ch, ok := s.activity[owner]
906 if !ok {
907 ch = make(chan struct{}, 1)
908 s.activity[owner] = ch
909 }
910 return ch
911}
912
913func (s *Server) isDialSuppressed(target string) bool {
914 now := time.Now()

Callers 2

handleTunnelMethod · 0.95
kickMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected