1.1.24.12 send
C
ssize_t send(int fd, const void *buf, size_t len, int flags)
Description
Send a message on a socket.
Parameters
Parameters | Description |
---|---|
fd | Socket file descriptor. |
buf | Pointer to buffer containing data to send. |
len | Length of data to send. |
flags | Option for transmission, currently ignored. |
Returns
The number of bytes sent or -1 for error, see errno
.
Remarks
errno | Description |
---|---|
EBADF | The argument fd is not a valid file descriptor. |
EFAULT | System fault. |
ENOTSOCK | The file descriptor fd does not refer to a socket. |
EWOULDBLOCK | The socket is marked nonblocking and the send operation would block. |
ENOMEM | Insufficient memory is available. |
EDESTADDRREQ | The socket is not connection-mode, and no peer address is set. |
ENOTCONN | The socket is not connected, and no target has been given. |