MCPcopy
hub / github.com/coyove/goflyway / Write

Method Write

proxy/server.go:103–110  ·  view source on GitHub ↗
(w http.ResponseWriter, key *[ivLen]byte, p []byte, code int)

Source from the content-addressed store, hash-verified

101}
102
103func (proxy *ProxyServer) Write(w http.ResponseWriter, key *[ivLen]byte, p []byte, code int) (n int, err error) {
104 if ctr := proxy.Cipher.getCipherStream(key); ctr != nil {
105 ctr.XORKeyStream(p, p)
106 }
107
108 w.WriteHeader(code)
109 return w.Write(p)
110}
111
112func (proxy *ProxyServer) hijack(w http.ResponseWriter) net.Conn {
113 hij, ok := w.(http.Hijacker)

Callers 3

ServeHTTPMethod · 0.95
replyGoodMethod · 0.45

Calls 2

getCipherStreamMethod · 0.80
WriteHeaderMethod · 0.80

Tested by

no test coverage detected