Socket Programming
Creating Network Applications
Preparation
- \(2.7\) Socket Programming: Creating Network Applications
Lesson Objectives
- Define a socket as the programming interface between application and transport layer
- Explain why network data must be encoded as bytes rather than transmitted as string
- Identify the differences between TCP and UDP sockets
- Implement a basic HTTP server using Python socket library
Exercise
- Use
netcatto listen on a port and send messages - Write an HTTP server that responds to basic GET requests
- Use
curlto test your server