.BI "int " flags );
.SH DESCRIPTION
The system calls
-.BR send ,
-.BR sendto ,
+.BR send (),
+.BR sendto (),
and
-.B sendmsg
+.BR sendmsg ()
are used to transmit a message to another socket.
.PP
The
-.B send
+.BR send ()
call may be used only when the socket is in a
.I connected
state (so that the intended recipient is known).
The only difference between
-.B send
+.BR send ()
and
.B write
is the presence of
With zero
.I flags
parameter,
-.B send
+.BR send ()
is equivalent to
.BR write .
Also,
is the file descriptor of the sending socket.
.PP
If
-.B sendto
+.BR sendto ()
is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) socket,
the parameters
.I to
.I tolen
specifying its size.
For
-.BR sendmsg ,
+.BR sendmsg (),
the address of the target is given by
.IR msg.msg_name ,
with
specifying its size.
.PP
For
-.B send
+.BR send ()
and
-.BR sendto ,
+.BR sendto (),
the message is found in
.I buf
and has length
.IR len .
For
-.BR sendmsg ,
+.BR sendmsg (),
the message is pointed to by the elements of the array
.IR msg.msg_iov .
The
-.B sendmsg
+.BR sendmsg ()
call also allows sending ancillary data (also known as control information).
.PP
If the message is too long to pass atomically through the
is returned, and the message is not transmitted.
.PP
No indication of failure to deliver is implicit in a
-.BR send .
+.BR send ().
Locally detected errors are indicated by a return value of \-1.
.PP
When the message does not fit into the send buffer of the socket,
-.B send
+.BR send ()
normally blocks, unless the socket has been placed in non-blocking I/O
mode. In non-blocking mode it would return
.B EAGAIN