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

Method kick

internal/exit/exit.go:891–897  ·  view source on GitHub ↗

kick wakes the long-poll handler currently serving owner so it drains pending TX frames immediately. A non-blocking send keeps repeated kicks from blocking the upstream-read goroutine when the owner is not currently polling — the buffered len-1 channel collapses bursts into a single wake.

(owner [frame.ClientIDLen]byte)

Source from the content-addressed store, hash-verified

889// from blocking the upstream-read goroutine when the owner is not currently
890// polling — the buffered len-1 channel collapses bursts into a single wake.
891func (s *Server) kick(owner [frame.ClientIDLen]byte) {
892 ch := s.activityFor(owner)
893 select {
894 case ch <- struct{}{}:
895 default:
896 }
897}
898
899// activityFor returns owner's wake channel, lazily allocating it on first
900// use. Channels are kept for the life of the server; with a small number of

Callers 3

queueRSTMethod · 0.95
queueVersionResponseMethod · 0.95
openSessionMethod · 0.95

Calls 1

activityForMethod · 0.95

Tested by

no test coverage detected