Skip to content

Commit

Permalink
doc/go1.22: document zero-copy to net.UnixConn
Browse files Browse the repository at this point in the history
For #58808

Change-Id: Id73b9e4b5fb96426a01b76ce7a1053a6ad61a58e
Reviewed-on: https://go-review.googlesource.com/c/go/+/549197
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Roland Shoemaker <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
  • Loading branch information
neild authored and gopherbot committed Dec 12, 2023
1 parent 962dade commit dce7f33
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/go1.22.html
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
<p><!-- https://go.dev/issue/58808 -->
TODO: <a href="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
When <a href="/pkg/io#Copy"><code>io.Copy</code></a> copies
from a <code>TCPConn</code> to a <code>UnixConn</code>,
it will now use Linux's <code>sendfile(2)</code> system call if possible,
using the new method <a href="/pkg/net#TCPConn.WriteTo"><code>TCPConn.WriteTo</code></a>.
</p>

<p><!-- CL 467335 -->
Expand Down Expand Up @@ -672,7 +675,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
</p>

<p><!-- https://go.dev/issue/58808 -->
TODO: <a href="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
When <a href="/pkg/io#Copy"><code>io.Copy</code></a> copies
from a <code>File</code> to a <code>net.UnixConn</code>,
it will now use Linux's <code>sendfile(2)</code> system call if possible,
using the new method <a href="/pkg/os#File.WriteTo"><code>File.WriteTo</code></a>.
</p>
</dd>
</dl><!-- os -->
Expand Down

0 comments on commit dce7f33

Please sign in to comment.