summaryrefslogtreecommitdiff
path: root/src/internal/syscall/unix/net.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use new "unix" build tag where appropriateIan Lance Taylor2022-03-291-1/+1
| | | | | | | | | | For #20322 For #51572 Change-Id: Id0b4799d097d01128e98ba4cc0092298357bca45 Reviewed-on: https://go-review.googlesource.com/c/go/+/389935 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
* net: pass around pointers to SockaddrInetNJosh Bleecher Snyder2021-11-041-4/+4
| | | | | | | | | | | | | ...instead of the structs themselves. Escape analysis can handle this, and it'll avoid a bunch of large struct copies. Change-Id: Ia9c6064ed32a4c26d5a96dae2ed7d7ece6d38704 Reviewed-on: https://go-review.googlesource.com/c/go/+/361264 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: remove the alloc from ReadMsgUDPAddrPortJosh Bleecher Snyder2021-11-041-0/+8
| | | | | | | | | | | | | | | | | | name old time/op new time/op delta ReadWriteMsgUDPAddrPort-8 4.95µs ± 5% 4.55µs ± 1% -7.96% (p=0.016 n=5+4) name old alloc/op new alloc/op delta ReadWriteMsgUDPAddrPort-8 32.0B ± 0% 0.0B -100.00% (p=0.008 n=5+5) name old allocs/op new allocs/op delta ReadWriteMsgUDPAddrPort-8 1.00 ± 0% 0.00 -100.00% (p=0.008 n=5+5) Change-Id: Ib968c6f2968926ec9a364dd52063cd0d7c29b10c Reviewed-on: https://go-review.googlesource.com/c/go/+/360862 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* net: remove the alloc from WriteMsgUDPAddrPortJosh Bleecher Snyder2021-11-041-0/+8
| | | | | | | | | | | | | | | | | | name old time/op new time/op delta ReadWriteMsgUDPAddrPort-8 5.12µs ± 8% 4.59µs ± 3% -10.19% (p=0.000 n=10+9) name old alloc/op new alloc/op delta ReadWriteMsgUDPAddrPort-8 64.0B ± 0% 32.0B ± 0% -50.00% (p=0.000 n=10+10) name old allocs/op new allocs/op delta ReadWriteMsgUDPAddrPort-8 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=10+10) Change-Id: Idf540b2f9f8035660305a0ab1cfc3e162569db63 Reviewed-on: https://go-review.googlesource.com/c/go/+/361257 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
* syscall: migrate new UDP send/recv API to internal/syscall/unixJosh Bleecher Snyder2021-11-031-0/+28
CL 331490 and friends added new API to package syscall. This was a mistake that we need to fix before Go 1.18 is released. Change-Id: I697c9a4fa649d564822f585dc163df5ab9e5ae08 Reviewed-on: https://go-review.googlesource.com/c/go/+/361216 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>