Syntax
#include <sys/types.h>
#include <sys/socket.h>
int send(int socket_descriptor,
char *buffer,
int buffer_length,
int flags)
|
The send() function is used to send data through a connected socket.
Parameters
Return Value
send() returns an integer. Possible values are:
Error Conditions
When send() fails, errno can be set to one of the following:
This error code indicates one of the following:
This error code can only be returned on sockets that use a connectionless transport service.
A destination address has not been associated with the socket pointed to by the socket_descriptor parameter. This error code can only be returned on sockets that use a connectionless transport service.
The system detected an address which was not valid while attempting to access the buffer parameter.
This error code can only be returned on sockets that use a connectionless transport service.
This error code can only be returned on sockets that use a connectionless transport service.
The buffer_length parameter specifies a negative value.
The data to be sent could not be sent atomically because the size specified by buffer_length is too large.
This error code can only be returned on sockets that use a connectionless transport service.
This error code can only be returned on sockets that use a connectionless transport service.
This error code can only be returned on sockets that use a connection-oriented transport service.
This error code indicates one of the following:
Error Messages
Usage Notes
Related Information
| Top | Sockets APIs | APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |