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 around it.
So far, this book has been focused mainly on network code as it would pertain to personal computers and servers. In the next chapter...