- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for sendFile (0.1 sec)
-
cmd/storage-rest-server.go
// Attempt to use splice/sendfile() optimization, A very specific behavior mentioned below is necessary. // See https://github.com/golang/go/blob/f7c5cbb82087c55aa82081e931e0142783700ce8/src/net/sendfile_linux.go#L20 // Windows can lock up with this optimization, so we fall back to regular copy. sr, ok := rc.(*sendFileReader) if ok { // Sendfile sends in 4MiB chunks per sendfile syscall which is more than enough
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 44.8K bytes - Viewed (0) -
src/net/http/transport.go
w.pc.nwrite += int64(n) return } // ReadFrom exposes persistConnWriter's underlying Conn to io.Copy and if // the Conn implements io.ReaderFrom, it can take advantage of optimizations // such as sendfile. func (w persistConnWriter) ReadFrom(r io.Reader) (n int64, err error) { n, err = io.Copy(w.pc.conn, r) w.pc.nwrite += n return } var _ io.ReaderFrom = (*persistConnWriter)(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/net/http/server.go
// from io.Copy. type writerOnly struct { io.Writer } // ReadFrom is here to optimize copying from an [*os.File] regular file // to a [*net.TCPConn] with sendfile, or from a supported src type such // as a *net.TCPConn on Linux with splice. func (w *response) ReadFrom(src io.Reader) (n int64, err error) { buf := getCopyBuf() defer putCopyBuf(buf)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0)