Navigation Menu

Skip to content
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: no way to lower listen backlog on a TCP listen socket #6079

Closed
gopherbot opened this issue Aug 8, 2013 · 11 comments
Closed

net: no way to lower listen backlog on a TCP listen socket #6079

gopherbot opened this issue Aug 8, 2013 · 11 comments

Comments

@gopherbot
Copy link

by vinay.ys:

While writing a tcp server one may need to set the tcp listen backlog to a lower value
than the system default. There don't seem to be any API available in net package to
accomplish this.

Which version are you using?  (run 'go version')
go version devel +d3f99f091748 Tue Jun 25 17:04:18 2013 -0700 linux/amd64
@alberts
Copy link
Contributor

alberts commented Aug 8, 2013

Comment 1:

One workaround is to create the socket yourself using syscall.Socket, syscall.Bind and
syscall.Listen and then use net.FileListener. Not ideal though...

@gopherbot
Copy link
Author

Comment 2 by vinay.ys:

Yes, that is an acceptable temporary workaround. My primary use-case is a net/http
server. For that this workaround is more than a few lines of code.

@remyoudompheng
Copy link
Contributor

Comment 3:

What problem are you trying to solve?

@gopherbot
Copy link
Author

Comment 4 by vinay.ys:

I'm trying to reduce the number of connections waiting in the listen backlog of a daemon
I wrote using net/http.

@robpike
Copy link
Contributor

robpike commented Aug 14, 2013

Comment 5:

Labels changed: added priority-later, removed priority-triage.

@robpike
Copy link
Contributor

robpike commented Aug 15, 2013

Comment 6:

Status changed to Accepted.

@mikioh
Copy link
Contributor

mikioh commented Sep 14, 2013

Comment 7:

Labels changed: removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 8:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 10:

Labels changed: added repo-main.

@mikioh
Copy link
Contributor

mikioh commented Jun 20, 2015

Merged into #9661.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants