(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte)
| 552 | } |
| 553 | |
| 554 | func (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 |
no test coverage detected