Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (s and S) send(2)
RETURN VALUES
Upon successful completion, the send( ) function returns the number of bytes sent. Otherwise,
the value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the send( ) function sets errno to the corresponding
value:
[EBADF] The socket parameter is not a valid le descriptor.
[ECONNRESET]
One of the following conditions occurred:
The transport-provider process for this socket is no longer available.
The TCP/IP subsystem for this socket is no longer available.
The connection was forcibly closed by the peer socket.
The socket can only be closed.
[EDESTADDRREQ]
The socket is not connection-oriented and no peer address is set.
[EFAULT] A user-supplied memory buffer cannot be accessed.
[EINTR] A signal interrupted the function before any data was transmitted.
[EIO] An input or output error occurred.
[EMSGSIZE] The message is too large to be sent all at once, as required by the socket.
[ENETDOWN]
The local interface used to reach the destination is down.
[ENETUNREACH]
No route to the network or host is present.
[ENOBUFS] There was not enough buffer space available to complete the call. A retry at a
later time might succeed.
[ENOMEM] Required memory resources were not available. A retry at a later time might
succeed.
[ENOTCONN] The socket either is not connected or has not had the peer socket previously
specied.
[ENOTSOCK] The socket parameter does not refer to a socket.
[EOPNOTSUPP]
The specied value for the ags parameter is not supported for this socket type
or protocol.
[EPIPE] One of the following conditions occurred:
An attempt was made to send a message on a socket that is shut down
for writing.
An attempt was made to send a message on a connection-oriented socket
and the peer socket is closed or shut down for reading. The SIGPIPE
signal is also sent to the calling process.
527186-003 Hewlett-Packard Company 723