diff options
author | Ian Gudger <igudger@google.com> | 2020-02-06 14:03:49 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-06 14:07:04 -0800 |
commit | 736775e0ac592c266acac0a7415f21d54715a54c (patch) | |
tree | 902007ad71d46bebc14f362f957a4a1ee1a273cb /benchmarks/tcp | |
parent | 615d66111214f5ae9b41fb2a89bb3549c03fc7af (diff) |
Make gonet consistent both internally and with the net package.
The types gonet.Conn and gonet.PacketConn were confusingly named as both
implemented net.Conn. Further, gonet.Conn was perhaps unexpectedly
TCP-specific (net.Conn is not). This change renames them to gonet.TCPConn and
gonet.UDPConn.
Renames gonet.NewListener to gonet.ListenTCP and adds a new gonet.NewTCPListner
function to be consistent with both the gonet.DialXxx and gonet.NewXxxConn
functions as well as net.ListenTCP.
Updates #1632
PiperOrigin-RevId: 293671303
Diffstat (limited to 'benchmarks/tcp')
-rw-r--r-- | benchmarks/tcp/tcp_proxy.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmarks/tcp/tcp_proxy.go b/benchmarks/tcp/tcp_proxy.go index 72ada5700..73b7c4f5b 100644 --- a/benchmarks/tcp/tcp_proxy.go +++ b/benchmarks/tcp/tcp_proxy.go @@ -274,7 +274,7 @@ func (n netstackImpl) listen(port int) (net.Listener, error) { NIC: nicID, Port: uint16(port), } - listener, err := gonet.NewListener(n.s, addr, ipv4.ProtocolNumber) + listener, err := gonet.ListenTCP(n.s, addr, ipv4.ProtocolNumber) if err != nil { return nil, err } |