The second exercise is also on sockets, but to do it in a non-blocking way. Continue reading Beej's Guide to Network Programming to the end, the part about blocking and the select function.
Write a simple client-server program. The server accepts MANY clients (in a non-blocking way, using select). The server will be used to broadcast between the clients.
More precisely, when you type a string in any client, it sends the string to the server, which forwards it to the all the other clients, who output the string on the screen.
If during the last 10 seconds the client has not received either a string from the input or the server, it outputs some message.
A few programming tips:
The exercise is due next week.