Skip to content

Commit dce7f33

Browse files
neildgopherbot
authored andcommitted
doc/go1.22: document zero-copy to net.UnixConn
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]>
1 parent 962dade commit dce7f33

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/go1.22.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
602602
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
603603
<dd>
604604
<p><!-- https://go.dev/issue/58808 -->
605-
TODO: <a href="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
605+
When <a href="/pkg/io#Copy"><code>io.Copy</code></a> copies
606+
from a <code>TCPConn</code> to a <code>UnixConn</code>,
607+
it will now use Linux's <code>sendfile(2)</code> system call if possible,
608+
using the new method <a href="/pkg/net#TCPConn.WriteTo"><code>TCPConn.WriteTo</code></a>.
606609
</p>
607610

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

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

0 commit comments

Comments
 (0)