add directory Ref-docs
This commit is contained in:
67
Ref-docs/syscalls/syscalls_52.html
Normal file
67
Ref-docs/syscalls/syscalls_52.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<html><!-- This HTML file has been created by texi2html 1.29
|
||||
from syscalls.texi on 4 June 1994 -->
|
||||
|
||||
<TITLE>Syscall specifications of Linux - send</TITLE>
|
||||
<P>Go to the <A HREF="syscalls_51.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_51.html">previous</A>, <A HREF="syscalls_53.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_53.html">next</A> section.<P>
|
||||
<H2><A NAME="SEC52" HREF="syscalls_toc.html#SEC52" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC52">send, sendmsg and sendto</A></H2>
|
||||
<P>
|
||||
<H3>SYNOPSIS</H3>
|
||||
<P>
|
||||
<CODE>int send(int <VAR>s</VAR>, const void *<VAR>buf</VAR>, int <VAR>len</VAR>,
|
||||
unsigned int <VAR>flags</VAR>);</CODE>
|
||||
<P>
|
||||
<CODE>int sendto(int s, const void *<VAR>buf</VAR>, int len, unsigned int
|
||||
<VAR>flags</VAR>, const struct sockaddr *<VAR>to</VAR>, int <VAR>tolen</VAR>);</CODE>
|
||||
<P>
|
||||
<CODE>int sendmsg(int <VAR>s</VAR>, const struct msghdr *<VAR>msg</VAR> , unsigned
|
||||
int <VAR>flags</VAR>);</CODE>
|
||||
<P>
|
||||
<H3>PARAMETERS</H3>
|
||||
<P>
|
||||
<VAR>s</VAR>: [in] the socket on which to send.
|
||||
<P>
|
||||
<VAR>buf</VAR>: [in] points to the buffer that contains the data to send.
|
||||
<P>
|
||||
<VAR>len</VAR>: [in] the lenght of <VAR>buf</VAR>.
|
||||
<P>
|
||||
<VAR>flags</VAR>: [in] some flags (see description).
|
||||
<P>
|
||||
<VAR>to</VAR>: [in] points to the peer address where to send the data.
|
||||
<P>
|
||||
<VAR>tolen</VAR>: [in] the length of <VAR>to</VAR>.
|
||||
<P>
|
||||
<VAR>msg</VAR>: [in] the message to send.
|
||||
<P>
|
||||
<H3>DESCRIPTION</H3>
|
||||
<P>
|
||||
<CODE>sendmsg</CODE> is not yet implemented.
|
||||
<P>
|
||||
<CODE>send</CODE> is used to send data on a connection-oriented socket.
|
||||
<CODE>sendto</CODE> and <CODE>sendmsg</CODE> are used on connection-less or
|
||||
connection-oriented sockets. Unless the socket is non-blocking the call
|
||||
will block until the data is send.
|
||||
<P>
|
||||
The <VAR>flags</VAR> may be one or more or'ed values from the following:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT><CODE>MSG_OOB</CODE>
|
||||
<DD>send the data out-of-band.
|
||||
<P>
|
||||
<DT><CODE>MSG_DONTROUTE</CODE>
|
||||
<DD>bypass the routing facilities of the system.
|
||||
</DL>
|
||||
<P>
|
||||
<H3>RETURN VALUE</H3>
|
||||
<P>
|
||||
On success, returns the number of bytes sent. On error, the call returns
|
||||
-1 and sets <CODE>errno</CODE> to one of the following values:
|
||||
<P>
|
||||
<UL>
|
||||
<LI><CODE>EMSGSIZE</CODE>: the data is too big to be sent atomically.
|
||||
<LI><CODE>ENOBUFS</CODE>: the system has not enought memory to allocate an
|
||||
output buffer or the output queue for the network interface is full.
|
||||
<LI><CODE>EBADF</CODE>, <CODE>ENOTCONN</CODE>, <CODE>ENOTSOCK</CODE>,
|
||||
<CODE>EWOULDBLOCK</CODE>, <CODE>EINTR</CODE> or <CODE>EFAULT</CODE>.
|
||||
</UL>
|
||||
<P>
|
||||
<P>Go to the <A HREF="syscalls_51.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_51.html">previous</A>, <A HREF="syscalls_53.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_53.html">next</A> section.<P>
|
||||
Reference in New Issue
Block a user