add directory Ref-docs
This commit is contained in:
81
Ref-docs/syscalls/syscalls_54.html
Normal file
81
Ref-docs/syscalls/syscalls_54.html
Normal file
@@ -0,0 +1,81 @@
|
||||
<html><!-- This HTML file has been created by texi2html 1.29
|
||||
from syscalls.texi on 4 June 1994 -->
|
||||
|
||||
<TITLE>Syscall specifications of Linux - socket</TITLE>
|
||||
<P>Go to the <A HREF="syscalls_53.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_53.html">previous</A>, <A HREF="javascript:if(confirm('http://www.infran.ru/TechInfo/syscalls/syscalls_55.html \n\nThis file was not retrieved by Teleport Pro, because the server reports that an error occurred that prevented retrieval. \n\nDo you want to open it from the server?'))window.location='http://www.infran.ru/TechInfo/syscalls/syscalls_55.html'" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_55.html">next</A> section.<P>
|
||||
<H2><A NAME="SEC54" HREF="syscalls_toc.html#SEC54" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC54">socket</A></H2>
|
||||
<P>
|
||||
<H3>SYNOPSIS</H3>
|
||||
<P>
|
||||
<CODE>int socket(int <VAR>domain</VAR>, int <VAR>type</VAR>, int <VAR>protocol</VAR>);</CODE>
|
||||
|
||||
<H3>PARAMETERS</H3>
|
||||
<P>
|
||||
<VAR>domain</VAR>: [in] the protocol family of the socket.
|
||||
<P>
|
||||
<VAR>type</VAR>: [in] its type.
|
||||
<P>
|
||||
<VAR>protocol</VAR>: [in] the protocol used for communications.
|
||||
<P>
|
||||
<H3>DESCRIPTION</H3>
|
||||
<P>
|
||||
Creates a communication endpoint. The <VAR>domain</VAR> parameter can take
|
||||
the following values:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT><CODE>AF_UNIX</CODE>
|
||||
<DD>Unix internal protocols.
|
||||
<P>
|
||||
<DT><CODE>AF_INET</CODE>
|
||||
<DD>ARPA protocols (TCP/IP and so on).
|
||||
<P>
|
||||
<DT><CODE>AF_ISO</CODE>
|
||||
<DD>ISO protocols.
|
||||
<P>
|
||||
<DT><CODE>AF_NS</CODE>
|
||||
<DD>Xerox Network System protocols.
|
||||
<P>
|
||||
<DT><CODE>AF_IMPLINK</CODE>
|
||||
<DD>IMP link layer.
|
||||
</DL>
|
||||
<P>
|
||||
As of version 1.0 of Linux: <CODE>AF_ISO</CODE>, <CODE>AF_IMPLINK</CODE> and
|
||||
<CODE>AF_NS</CODE> are not supported.
|
||||
<P>
|
||||
The <VAR>type</VAR> parameter may take the following values:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT><CODE>SOCK_STREAM</CODE>
|
||||
<DD>full-duplex, reliable, sequenced, connection-oriented stream. Out-of-band data
|
||||
may be supported.
|
||||
<P>
|
||||
<DT><CODE>SOCK_DGRAM</CODE>
|
||||
<DD>connection-less, unreliable link for datagram transmission.
|
||||
<P>
|
||||
<DT><CODE>SOCK_RAW</CODE>
|
||||
<DD>only a task with superuser privileges may use this options (see kernel).
|
||||
<P>
|
||||
<DT><CODE>SOCK_SEQPACKET</CODE>
|
||||
<DD>full-duplex, reliable, sequenced, connection-oriented link for datagram
|
||||
of a specified size. Usable only with the <CODE>AF_NS</CODE> domain.
|
||||
<P>
|
||||
<DT><CODE>SOCK_RDM</CODE>
|
||||
<DD>not implemented yet.
|
||||
</DL>
|
||||
<P>
|
||||
The <CODE>SOCK_STREAM</CODE> type provide reliable transmission. Even when the
|
||||
connection is not transmitting usefull information, a packet is send at
|
||||
a regular interval to ensure that the connection is still intact.
|
||||
<P>
|
||||
<H3>RETURN VALUE</H3>
|
||||
<P>
|
||||
On success, a new file descriptor for the socket is returned. On error,
|
||||
-1 is returned and <CODE>errno</CODE> is set to one of the following values:
|
||||
<P>
|
||||
<UL>
|
||||
<LI><CODE>EACCESS</CODE>: the calling task does not have permission to
|
||||
create a socket of the specified domain, type and protocol.
|
||||
<LI><CODE>EPROTONOSUPPORT</CODE>, <CODE>EMFILE</CODE>, <CODE>ENFILE</CODE> or <CODE>ENOBUFFS</CODE>.
|
||||
</UL>
|
||||
<P>
|
||||
<P>Go to the <A HREF="syscalls_53.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_53.html">previous</A>, <A HREF="javascript:if(confirm('http://www.infran.ru/TechInfo/syscalls/syscalls_55.html \n\nThis file was not retrieved by Teleport Pro, because the server reports that an error occurred that prevented retrieval. \n\nDo you want to open it from the server?'))window.location='http://www.infran.ru/TechInfo/syscalls/syscalls_55.html'" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_55.html">next</A> section.<P>
|
||||
Reference in New Issue
Block a user