Summary

In this chapter, we discussed basic TCP/IP socket programming using Python's socket and ssl module. We demonstrated how simple TCP sockets can be wrapped with TLS and used to carry encrypted data. We also found the ways to validate the authenticity of a remote server using SSL certificates. Some other minor issues around socket programming, such as non-blocking socket I/O were also presented. The detailed packet analysis in each section helps us to understand what happens under the hood in our socket programming exercises.

In the next chapter, we will learn about the socket server design, particularly the popular multithreaded and event-driven approaches will be touched upon.

Get Learning Python Network Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.