Writing a UDP Server

In the last lesson, we'd written code to setup an IPV4 socket on UDP. Let's now get into writing a program for a basic server.

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:

  1. Print the original message received from the client.
  2. Capitalize the message.
  3. Send the capitalized version back to the client.

Let’s code!

Get hands-on with 1200+ tech skills courses.