Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/sys/listen.2
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93 | .\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 18, 2016 | .Dd April 14, 2020 | ||||
.Dt LISTEN 2 | .Dt LISTEN 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm listen | .Nm listen | ||||
.Nd listen for connections on a socket | .Nd listen for connections on a socket | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
specifies a hard limit on | specifies a hard limit on | ||||
.Fa backlog ; | .Fa backlog ; | ||||
if a value greater than | if a value greater than | ||||
.Va kern.ipc.soacceptqueue | .Va kern.ipc.soacceptqueue | ||||
or less than zero is specified, | or less than zero is specified, | ||||
.Fa backlog | .Fa backlog | ||||
is silently forced to | is silently forced to | ||||
.Va kern.ipc.soacceptqueue . | .Va kern.ipc.soacceptqueue . | ||||
.Pp | |||||
If the listen queue overflows, the kernel will emit a LOG_DEBUG syslog message. | |||||
The | |||||
.Xr sysctl 3 | |||||
MIB variable | |||||
.Va kern.ipc.sooverinterval | |||||
specifies a per-socket limit on how often the kernel will emit these messages. | |||||
.Sh INTERACTION WITH ACCEPT FILTERS | .Sh INTERACTION WITH ACCEPT FILTERS | ||||
When accept filtering is used on a socket, a second queue will | When accept filtering is used on a socket, a second queue will | ||||
be used to hold sockets that have connected, but have not yet | be used to hold sockets that have connected, but have not yet | ||||
met their accept filtering criteria. | met their accept filtering criteria. | ||||
Once the criteria has been | Once the criteria has been | ||||
met, these sockets will be moved over into the completed connection | met, these sockets will be moved over into the completed connection | ||||
queue to be | queue to be | ||||
.Xr accept 2 Ns ed . | .Xr accept 2 Ns ed . | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |