$linuxjunkies
>

send/receive

also: send(), recv(), write/read, I/O operation

A fundamental I/O operation where a process transmits (send) or receives data through a network socket or inter-process communication channel. In networking, send writes data to a socket destined for a remote host, while receive reads incoming data.

Send and receive are complementary socket operations that form the basis of network communication in Linux. The send() system call writes data from a process's buffer to a socket, queuing it for transmission to a remote endpoint. The recv() system call reads data that has arrived at a socket into a process's buffer.

These operations are blocking by default, meaning a process will pause until the operation completes. For example, recv() waits until data arrives; send() waits until the kernel accepts the data into its send buffer.

Common variants include sendto()/recvfrom() for UDP (connectionless), write()/read() for file descriptors, and sendmsg()/recvmsg() for advanced operations with multiple buffers. Non-blocking I/O and multiplexing tools like select() or epoll() allow handling many sockets efficiently.

Related terms