MCPcopy Index your code
hub / github.com/subtrace/subtrace / Hijack

Method Hijack

devtools/devtools.go:328–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

326}
327
328func (w *pipeResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
329 if w.wasHijacked {
330 return nil, nil, fmt.Errorf("already hijacked")
331 }
332 w.wasHijacked = true
333
334 if w.wroteHeader && !w.sentResponse {
335 w.pw.Close()
336 w.sendResponse()
337 <-w.done
338 }
339 return w.conn, w.brw, nil
340}

Callers 2

ModifyRequestMethod · 0.80
ModifyRequestMethod · 0.80

Calls 2

sendResponseMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected