Open System Services System Calls Reference Manual (G06.28+)
spt_sendx(2) OSS System Calls Reference Manual
NOTES
The macro to map send() to spt_sendx() is available in C applications when
SPT_THREAD_AWARE_NONBLOCK
has been defined in the following manner before
including spthread.h:
#define SPT_THREAD_AWARE_NONBLOCK
The alias to link send() to spt_sendx() is available in C++ applications when
SPT_THREAD_AWARE_PRAGMA_NONBLOCK
has been defined in the following manner
before including spthread.h:
#define SPT_THREAD_AWARE_PRAGMA_NONBLOCK
When data can be sent, a call to the select() function indicates that the file descriptor for the
socket is ready for writing.
Calling the spt_sendx() function with a flags parameter of 0 (zero) is identical to calling the
spt_writex() function.
RETURN VALUES
Upon successful completion, the spt_sendx() function returns the number of bytes sent. Other-
wise, the value -1 is returned and errno is set to indicate the error.
If the socket becomes invalid (is closed by another thread), -1 is returned with an errno value of
[EBADF]. If a signal is received via the pthread_kill() function and is not blocked, ignored, or
handled, -1 is returned with an errno value of [EINTR].
ERRORS
If any of the following conditions occurs, the spt_sendx() function sets errno to the correspond-
ing value:
[EBADF] The socket parameter is not a valid file 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 avail-
able.
• 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 transmit-
ted.
[EIO] An input or output error occurred.
[EMSGSIZE] The message is too large to be sent all at once, as required by the
socket.
7−302 Hewlett-Packard Company 527186-005