Writing a UDP Server
Explore how to build a UDP server using Python socket programming. Understand creating sockets, continuously listening for client messages, processing data by capitalizing it, and sending responses back to clients. This lesson equips you with foundational skills to implement simple, functional UDP servers.
Setting a Purpose for the Server
In this lesson, we’ll finish writing our server program. Our server will reply to every client’s message with a capitalized version of whatever a client program sends to it. This is just what we’re requiring of our server to do, there are other functions that such a server can perform as well.
So, in particular, the server will:
- Print the original message received from the client.
- Capitalize the message.
- Send the capitalized version back to the client.