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

Method queueVersionResponse

internal/exit/exit.go:554–564  ·  view source on GitHub ↗
(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte)

Source from the content-addressed store, hash-verified

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"})
556 if err != nil {
557 payload = []byte("{\"ok\":false}")
558 }
559 rst := &frame.Frame{SessionID: sessionID, Flags: frame.FlagRST, Payload: payload}
560 s.mu.Lock()
561 s.pendingCtrl[owner] = append(s.pendingCtrl[owner], rst)
562 s.mu.Unlock()
563 s.kick(owner)
564}
565
566// openSession dials the upstream target, creates a Session for the given ID,
567// registers it under the given owner, and spawns the bidirectional pump

Callers 1

routeIncomingMethod · 0.95

Calls 2

kickMethod · 0.95
EncodeVersionInfoFunction · 0.92

Tested by

no test coverage detected