Here's the assignment opening:
"In this assignment you will write a program which relays messages, inspired by the children’s ‘‘telephone
game’’ in which children whisper a message to one another and we see how it gets distorted in the
relaying. Your assignment four program will not distort the messages, but rather, will keep track of the
random path the messages take until they get back to their originator.
Your program will be called ‘‘yak.c’’ (‘‘telephonegame.c’’ was too long), and it will communicate
with other instances of itself (or other students’ or my solutions), which are referred to below as
‘‘yakkers’’.
Yak repeatedly does the following: It either reads a line from the standard input or receives a
message from a connected ‘‘peer’’ (using select()). If this message originated with me, or has been
circulating on too long a path (there is a ‘‘−c’’ option to set the maximum length of this path), it is
displayed to the user. Otherwise, it is relayed to a random one of the connected peers.
Each message is prefaced by a list of IP address/port numbers which show the route the message has
taken so far. This list is prepended to each time the message is relayed.
As messages are received (and possibly relayed), we may learn of other yakkers we didn’t know
about. Since the message contains their IP address and listening port number, we can connect to them to
expand our network.
Furthermore, a blank line on stdin means to display a list of all current connections.
New peers may connect at any time (so your listening port number will also be included in the
select())."

Basically you send a message out and it goes to random people (each new person only connects to one of the existing people in the chat and by relaying messages out to them, you learn about people connected to other people. Not much better of an explanation :P