MCPcopy
hub / github.com/monasticacademy/httptap / Write

Method Write

experiments/tun2socks/tun2socks-experiment.go:39–50  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

37}
38
39func (e *endpointWriter) Write(p []byte) (int, error) {
40 var r bytes.Reader
41 r.Reset(p)
42 n, err := e.ep.Write(&r, tcpip.WriteOptions{})
43 if err != nil {
44 return int(n), &tcpipError{err}
45 }
46 if n != int64(len(p)) {
47 return int(n), io.ErrShortWrite
48 }
49 return int(n), nil
50}
51
52var isVerbose bool
53

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected