The send() and sendto() functions send a message from one socket to another. send() may be used only when the socket is in a connected state, while sendto() may be used at any time.
int send(
int s,
char* buf,
int len,
int flags
);
int sendto(
int s,
char* buf,
int len,
int flags,
struct sockaddr to,
int tolen
);
s
buf
len
send() and sendto().
flags
to
tolen
to argument. No indication of failure to deliver is implicit in a send. Return values of -1 indicate some locally detected errors.
-1 and the function sets errno to one of these values:
EBADF |
Invalid file descriptor or file not opened for writing. |
ENOSPC |
No space left on device. |
| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/sys/socket.h | sys/types.h sys/socket.h |
netiff3m.lib |