Syntax: int send(int s, char *msg, int len, int flags);
Header: NetLib - sys/socket.h
Sockets - socklib.h
UnixLib - sys/socket.h
Returns: amount of data sent, or EOF if error
This call sends data on a socket. In the case of datagram and raw sockets, a single datagram containing the data will be sent, and EMSGSIZE will be returned if the data is too large to be sent in this way. For stream sockets, the call will block until all the data has been sent, unless the socket has been marked non-blocking, in which case as much data as possible will be sent.
Because this call does not specify the address to send to, the socket used for this call must be a connected socket.
C definition SWI definition
|
|
|