⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listen.3.man

📁 This a separate release of the OpenSS7 X/Open XTI/TLI library, TLI modules (timod, tirdwr) and the I
💻 MAN
字号:
'\" rtp.\" -*- nroff -*- vim: ft=nroff noautoindent nocindent nosmartindent.\".\" @(#) listen.3.man,v 1.1.2.1 2004/05/16 02:35:34 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004  OpenSS7 Corporation <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date.  The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein.  The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" -------------------------------------------------------------------------.\".\" U.S. GOVERNMENT RESTRICTED RIGHTS.  If you are licensing this Software.\" on behalf of the U.S. Government ("Government"), the following.\" provisions apply to you.  If the Software is supplied by the Department.\" of Defense ("DoD"), it is classified as "Commercial Computer Software".\" under paragraph 252.227-7014 of the DoD Supplement to the Federal.\" Acquisition Regulations ("DFARS") (or any successor regulations) and the.\" Government is acquiring only the license rights granted herein (the.\" license rights customarily provided to non-Government users).  If the.\" Software is supplied to any unit or agency of the Government other than.\" DoD, it is classified as "Restricted Computer Software" and the.\" Government's rights in the Software are defined in paragraph 52.227-19.\" of the Federal Acquisition Regulations ("FAR") (or any success.\" regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the.\" NASA Supplement to the FAR (or any successor regulations)..\".\" =========================================================================.\" .\" Commercial licensing and support of this software is available from.\" OpenSS7 Corporation at a fee.  See http://www.openss7.com/.\" .\" =========================================================================.\".\" Last Modified 2004/05/16 02:35:34 by brian.\".\" =========================================================================.so strxnet.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase strxnet.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".\".\".TH LISTEN 3 "2004/05/16 02:35:34" "strxnet-0_9_2-4" "Linux Fast-STREAMS Sockets Library".SH NAME.B listen\- listen for socket connections and limit the queue of incoming connections.SH SYNOPSIS.PP.B #include <sys/socket.h>.HP.BI "int listen(int " socket ", int " backlog );.SH DESCRIPTION.PPThe.BR listen ()function marks a connection-mode socket, specified by the.I socketargument, as accepting connections..PPThe.I backlogargument provides a hint to the implementation which theimplementation will use to limit the number of outstanding connections in thesocket's listen queue. Normally, a larger.I backlogargument value will resultin a larger or equal length of the listen queue..PPThe implementation may include incomplete connections in its listen queue. Thelimits on the number of incomplete connections and completed connectionsqueued may be different..PPThe implementation may have an upper limit on the length of the listenqueue\(emeither global or per accepting socket.  If.I backlogexceeds this limit, thelength of the listen queue is set to the limit..PPIf.BR listen ()is called with a.I backlogargument value that is less than 0, thefunction behaves as if it had been called with a.I backlogargument value of 0..PPA.I backlogargument of 0 may allow the.I socketto accept connections, in whichcase the length of the listen queue may be set to an implementation-dependentminimum value..PPThe.I socketin use may require the process to have appropriate privileges touse the.BR listen ()function..SH CAVEATS.PPThis system call is implemented as a.B SIOCSOCKSYSIOCTL.  See.BR socksys (4)for more information..SH "RETURN VALUE".PPUpon successful completions,.BR listen ()returns 0. Otherwise, -1 is returned anderrno is set to indicate the error..SH ERRORS.PPThe.BR listen ()function will fail if:.TP.RB [ EBADF ]The.I socketargument is not a valid file descriptor..TP.RB [ EDESTADDRREQ ]The.I socketis not bound to a local address, and the protocol does not supportlistening on an unbound.IR socket ..TP.RB [ EINVAL ]The.I socketis already connected..TP.RB [ ENOTSOCK ]The.I socketargument does not refer to a socket..TP.RB [ EOPNOTSUPP ]The.I socketprotocol does not support.BR listen ().PPThe.BR listen ()function may fail if:.TP.RB [ EACCES ]The calling process does not have the appropriate privileges..TP.RB [ EINVAL ]The.I sockethas been shut down..TP.RB [ ENOBUFS ]Insufficient resources are available in the system to complete the call..SH "SEE ALSO".PP.BR accept (3),.BR connect (3),.BR socket (3),.BR <sys/socket.h> (5)..SH "CONFORMING TO".PPThe Open Group XNS Issue 5.2..[xns.].\".\".[$LIST$.].TI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -