You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It sounds as though you are asking for a change to the exported API of the net package, which is typically something that would require proposal review (see proposing changes.
It sounds as though you are asking for a change to the exported API of the net package, which is typically something that would require proposal review (see proposing changes.
Strictly speaking, yes, it is a change to the exported API. However, it is in the netutil package from the golang.org/x/net module. My understanding is that /x path prefix indicates "experimental". I wasn't clear if that would require a formal proposal to change an experimental package, so I started with a simple issue, including the proposed patch content.
Go version
go1.21.5
What operating system and processor architecture are you using (
go env
)?What did you do?
I was attempting to use the https://pkg.go.dev/golang.org/x/net/netutil#LimitListener to wrap the
*net.UnixListener
in listener_posix.go to limit connection acceptance at a theshold caclulated as a percentage of https://pkg.go.dev/syscall#Rlimit. Thepeertracker
code needs to assert the underlying*net.UnixConn
type here.I tested out a proposed fix using a local filesystem replace directive to code with this patch:
What did you expect to see?
I expected to be able to get at the underlying
*net.UnixConn
after wrapping with thenetutil.LimitListener
.What did you see instead?
The
limitListenerConn
was unexported so I couldn't assert the type of the embeddednet.Conn
.The text was updated successfully, but these errors were encountered: