Summary
TCP really serves as the backbone of the modern internet experience. TCP is used by HTTP, the protocol that powers websites, and by Simple Mail Transfer Protocol (SMTP), the protocol that powers email.
In this chapter, we saw that building a TCP client was fairly straightforward. The only really tricky part was having the client monitor for local terminal input while simultaneously monitoring for socket data. We were able to accomplish this with select() on Unix-based systems, but it was slightly trickier on Windows. Many real-world applications don't need to monitor terminal input, and so this step isn't always needed.
Building a TCP server that's suitable for many parallel connections wasn't much harder. Here, select() was extremely ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access