syscalls_50.html

来自「Linux系统调用」· HTML 代码 · 共 36 行

HTML
36
字号
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - listen</TITLE>
<P>Go to the <A HREF="syscalls_49.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_49.html">previous</A>, <A HREF="syscalls_51.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_51.html">next</A> section.<P>
<H2><A NAME="SEC50" HREF="syscalls_toc.html#SEC50" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC50">listen</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int listen(int <VAR>s</VAR>, int <VAR>backlog</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>s</VAR>: [in] the socket that will accept connections.
<P>
<VAR>backlog</VAR>: [in] the maximum number of queued connections.
<P>
<H3>DESCRIPTION</H3>
<P>
Notifies to the operating system the the task is ready to accept
connections on a socket and specifies the maximum number of incomming
connections that can be queued for that socket.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
set to one of the following values: 
<P>
<UL>
<LI><CODE>EOPNOTSUPP</CODE>: the socket protocol does not support the
<CODE>listen</CODE> call.
<LI><CODE>EBADF</CODE> or <CODE>ENOTSOCK</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_49.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_49.html">previous</A>, <A HREF="syscalls_51.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_51.html">next</A> section.<P>

⌨️ 快捷键说明

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