Home

UDP experiment

UDP Chat

A simple request and reply chat flow built on connectionless datagrams. It is meant to demonstrate how UDP exchanges messages without maintaining a session.

Purpose

Message round trips

Observe how the server responds to each inbound datagram without a persistent connection.

Best for

Protocol basics

Useful as an early lab for socket APIs, packet flow, and lightweight request handling.

How it works

  • The client sends a message over UDP.
  • The server receives the datagram and prepares a reply.
  • The response contains the original payload with a simple server prefix.

Run locally

python projects/udp-chat/server.py
python projects/udp-chat/client.py