send function in socket programming
Name:
send - send a message on a socket
Synopsis:
#include <sys/socket.h>
ssize_t send(int socket, const void *buffer, size_t length, int flags);
Description:
The send() function shall initiate transmission of a message from the specified socket to its peer. The send() function shall send a message only when the socket is connected (including when the peer of a connectionless socket has been set via connect()).
The send() function takes the following arguments:
socket:
Specifies the socket file descriptor.
buffer:
Points to the buffer containing the message to send.
length:
Specifies the length of the message in bytes.
flags:
Specifies the type of message transmission. Values of this argument are formed by logically OR'ing zero or more of the following flags:https://linux.die.net/man/3/send