send(2)
_________________________________________________________________
send System Call
Send a message from a socket.
_________________________________________________________________
SYNTAX
#include <socket.h>
int send (s, msg, len, user_flags)
int s;
char * msg;
int len;
int user_flags;
PARAMETERS
s File descriptor of the socket to send message
from.
msg Message buffer.
len Length of message (in bytes).
user_flags Flags to use when sending.
DESCRIPTION
Send transmits a message to another socket. Send may be used
only when the socket is connected.
The length of the message is given by the <len> argument. If the
message is too long to pass atomically through the underlying
protocol, then the error EMSGSIZE is returned, and the message is
not transmitted.
No indication of failure to deliver is implicit in a send.
Return values of -1 indicate some locally detected errors.
If no message space is available at the socket to hold the
message to be transmitted, then send normally blocks, unless the
socket has been placed in non-blocking I/O mode. The select call
determines when you may send more data.
The <user_flags> parameter may be set to SOF_OOB to send out-of-
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
send(2)
band data on sockets that support this notion (e.g.,
SOCK_STREAM).
ACCESS CONTROL
None.
RETURN VALUE
1..<len> Completed successfully. The call returns the
number of characters sent.
-1 An error occurred. Errno is set to indicate the
error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EBADF The argument <s> is not an active valid file
descriptor.
ENOTSOCK The argument <s> is not a socket.
EFAULT An invalid user space address was specified for a
parameter.
EMSGSIZE The socket requires that message be sent
atomically, and the size of the message made this
impossible.
EAGAIN The socket is marked non-blocking and the
requested operation would block.
EINTR The send was interrupted by delivery of a signal
before any data was delivered.
ENOTCONN Tried to send on unconnected socket.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)
send(2)
SEE ALSO
The related manual sections: recv(2), socket(2).
DG/UX 4.00 Page 3
Licensed material--property of copyright holder(s)