Network Programming
Network programming is a crucial skill for application developers. An extensive treatise on the topic would be a formidable endeavor, so we will look at some of the select examples you might encounter in your work. An important point to keep in mind is that network programming is the primary means of creating vulnerabilities in an application. Network programs are also inherently concurrent, making correct and safe network programming especially difficult. So, this section will include examples written with security and scalability in mind.
This chapter contains the following recipes:
- Writing TCP servers
- Writing TCP clients
- Writing a line-based TCP server
- Sending/receiving files using a TCP connection
- Writing a TLS client/server
- A TCP proxy for TLS termination and load-balancing
- Setting read/write deadlines
- Unblocking a blocked read or write operation
- Writing UDP clients/servers
- Making HTTP calls
- Running an HTTP...