Summary
We covered a lot of ground in this chapter. First, we reviewed error-handling methods, and then we implemented a function to obtain text descriptions for error codes.
We then jumped right into the hard details of TCP sockets. We saw how TCP sockets hide much complexity, and how it is sometimes necessary to understand that hidden state to get good application performance. We saw a method for an early timeout on a TCP connect() call, and we looked at how to terminate a connection with an orderly release.
We then took a closer look at the bind() function and how its usefulness differs between servers and clients. Finally, we discussed how the select() function limits the total number of sockets your program can handle, and how to work ...
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