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

Method queueRST

internal/exit/exit.go:546–552  ·  view source on GitHub ↗

queueRST enqueues a RST frame for the given session to be delivered to owner on its next poll. Also wakes that client's long-poll so the RST is flushed immediately rather than after the long-poll deadline.

(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte)

Source from the content-addressed store, hash-verified

544// owner on its next poll. Also wakes that client's long-poll so the RST is
545// flushed immediately rather than after the long-poll deadline.
546func (s *Server) queueRST(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte) {
547 rst := &frame.Frame{SessionID: sessionID, Flags: frame.FlagRST}
548 s.mu.Lock()
549 s.pendingRSTs[owner] = append(s.pendingRSTs[owner], rst)
550 s.mu.Unlock()
551 s.kick(owner)
552}
553
554func (s *Server) queueVersionResponse(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte) {
555 payload, err := protocol.EncodeVersionInfo(s.version, MaxFramePayload, []string{"zstd", "raw_base64"})

Callers 1

routeIncomingMethod · 0.95

Calls 1

kickMethod · 0.95

Tested by

no test coverage detected