add directory Ref-docs
This commit is contained in:
49
Ref-docs/syscalls/syscalls_41.html
Normal file
49
Ref-docs/syscalls/syscalls_41.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<html><!-- This HTML file has been created by texi2html 1.29
|
||||
from syscalls.texi on 4 June 1994 -->
|
||||
|
||||
<TITLE>Syscall specifications of Linux - accept</TITLE>
|
||||
<P>Go to the <A HREF="syscalls_40.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_40.html">previous</A>, <A HREF="syscalls_42.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_42.html">next</A> section.<P>
|
||||
<H2><A NAME="SEC41" HREF="syscalls_toc.html#SEC41" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC41">accept</A></H2>
|
||||
<P>
|
||||
<H3>SYNOPSIS</H3>
|
||||
<P>
|
||||
<CODE>int accept(int <VAR>s</VAR>, struct sockaddr *<VAR>addr</VAR>, int
|
||||
*<VAR>addrlen</VAR>);</CODE>
|
||||
<P>
|
||||
<H3>PARAMETERS</H3>
|
||||
<P>
|
||||
<VAR>s</VAR>: [in] the socket connections are accepted from.
|
||||
<P>
|
||||
<VAR>addr</VAR>: [out] contains the address of the the buffer that will be
|
||||
filled with the address of connecting entity.
|
||||
<P>
|
||||
<VAR>addrlen</VAR>: [out] on input contains the maximum length of addr in
|
||||
bytes, on output contains the length of addr in bytes.
|
||||
<P>
|
||||
<H3>DESCRIPTION</H3>
|
||||
<P>
|
||||
If connections are pending on the socket <VAR>s</VAR>, the first connection
|
||||
in the queue is dequeued and opened and a new socket with the same
|
||||
properties of <VAR>s</VAR> is returned. If no connection is pending and the
|
||||
socket is blocking, then the call blocks until a connection is requested
|
||||
on <VAR>s</VAR>. Otherwise the call returns an error code. The socket <VAR>s</VAR>
|
||||
remains open for future connections. The address of the connecting
|
||||
entity is returned in <VAR>addr</VAR>. The format of the address depends on
|
||||
the type of network on through which the socket communicates.
|
||||
<CODE>accept</CODE> does not send a confirmation at the connecting entity.
|
||||
<P>
|
||||
<H3>RETURN VALUE</H3>
|
||||
<P>
|
||||
On success, the call returns a positive value that is the file
|
||||
descriptor of the new socket. On errror, the call returns -1 and sets
|
||||
<CODE>errno</CODE> to one of the following error values:
|
||||
<P>
|
||||
<UL>
|
||||
<LI><CODE>EOPNOTSUPP</CODE>: The referenced socket is not of type
|
||||
<CODE>SOCK_STREAM</CODE>.
|
||||
<LI><CODE>EWOULDBLOCK</CODE>: The socket is marked non-blocking and no
|
||||
connection is pending.
|
||||
<LI><CODE>EBADF</CODE>, <CODE>ENOTSOCK</CODE> or <CODE>EFAULT</CODE>
|
||||
</UL>
|
||||
<P>
|
||||
<P>Go to the <A HREF="syscalls_40.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_40.html">previous</A>, <A HREF="syscalls_42.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_42.html">next</A> section.<P>
|
||||
Reference in New Issue
Block a user