New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: meta bug for Go2 changes #28900

Open
bradfitz opened this Issue Nov 20, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@bradfitz
Member

bradfitz commented Nov 20, 2018

This is a meta/index bug for things we might change in a possible future net/v2 (~ "Go 2") package, including both links to other issues, or just comments with API problems/cleanups that are too little to warrant their own bugs.

(This is not about net/http, net/mail, net/rpc, net/smtp, net/nextproto, or net/url. Those should have their own bugs if/when needed.)

@bradfitz bradfitz added the Go2 label Nov 20, 2018

@bradfitz

This comment has been minimized.

Member

bradfitz commented Nov 20, 2018

There's probably at least 1 too many ways to read from a UDP Conn:

go1.txt:pkg net, method (*UDPConn) Read([]uint8) (int, error)
go1.txt:pkg net, method (*UDPConn) ReadFrom([]uint8) (int, Addr, error)
go1.txt:pkg net, method (*UDPConn) ReadFromUDP([]uint8) (int, *UDPAddr, error)
go1.1.txt:pkg net, method (*UDPConn) ReadMsgUDP([]uint8, []uint8) (int, int, int, *UDPAddr, error)

Likewise with UnixConn and IPConn.

And maybe they're still not sufficient because it says at:

https://golang.org/pkg/net/#UDPConn.ReadMsgUDP

The packages golang.org/x/net/ipv4 and golang.org/x/net/ipv6 can be used to manipulate IP-level socket options in oob.

Maybe we can get it right in one place and remove some of the redundant ones.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Nov 20, 2018

  • #15735 - net: add mechanism to wait for readability on a TCPConn
  • #18757 - net: change ParseIP to return (IP, error)
@cespare

This comment has been minimized.

Contributor

cespare commented Nov 20, 2018

Also the more general

  • #18804 - net: reconsider representation of IP
@networkimprov

This comment has been minimized.

networkimprov commented Nov 28, 2018

This is now tagged for 1.13, but has been open since 2012

  • #4373 - net: errClosing not exported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment