-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
proposal: net: export listenerBacklog #67990
Comments
I suggest a doc change. The point of this function in the net package is to determine the maximum permitted backlog argument, not the "optimal" backlog argument. This function could easily be written as an external package. It doesn't really belong in the net package; as far as I know there are no functions in the net package that take a backlog argument. We could consider adding |
Thanks. Updated per your suggestion.
I would prefer to have this function available on all platforms, just like how the unexported one in But I guess only adding |
Proposal Details
The
listenerBacklog
function returns a cached value of theoptimalmaximum permitted listener backlog on the current system, obtained in platform-specific ways. This is useful for user code that makes directlisten(2)
syscalls and then callsnet.FileListener
to create anet.Listener
.Since the function signature is unlikely to change in the future, and we already had it exempted from the linkname restriction, I propose we add:
The text was updated successfully, but these errors were encountered: