Bringing It Together
To compile the threaded example, you need to add -lpthreads as the last argument to the cc compile & link command.
The programs in this article show you how to write a socket client and server. The client connects to the server, while the server waits for connection requests. You can add more power and flexibility to your programs by integrating multitasking, specifically threads.