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

Comments

Projects
None yet
6 participants
@gopherbot
Copy link

commented Aug 8, 2013

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

commented Aug 8, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2013

Comment 3:

What problem are you trying to solve?
@gopherbot

This comment has been minimized.

Copy link
Author

commented Aug 8, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2013

Comment 5:

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

@robpike

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2013

Comment 6:

Status changed to Accepted.

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Sep 14, 2013

Comment 7:

Labels changed: removed go1.2maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

Comment 8:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 9:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 10:

Labels changed: added repo-main.

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2015

Merged into #9661.

@mikioh mikioh closed this Jun 20, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.