diff --git a/man7/unix.7 b/man7/unix.7 index 7a4a04ee3..c7c883878 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -620,21 +620,21 @@ that the applications that pathname sockets follow the rules outlined above under .IR "Pathname sockets" . .SH EXAMPLE -The following code demonstrates the usage of sockets for local interprocess -communication. +The following code demonstrates the use of sequenced-packet +sockets for local interprocess communication. It consists of two programs. The server program waits for a connection from the client program. -The client sends all of its command-line arguments. -The server treats them as integers and adds them up. +The client sends each of its command-line arguments in separate messages. +The server treats the incoming messages as integers and adds them up. The client sends the command string "END". -The server returns the result. -The client prints the sum of the received integers and exits. +The server sends back a message containing the sum of the client's integers. +The client prints the sum and exits. The server waits for the next client to connect. -To stop the server the client is called with the command-line argument "DOWN". +To stop the server, the client is called with the command-line argument "DOWN". .PP The following output was recorded while running the server in the background -and repeatedly calling the client. -Execution of the server program ended when receiving the "DOWN" command. +and repeatedly executing the client. +Execution of the server program ends when it receives the "DOWN" command. .SS Example output .in +4n .nf