A conversation, packet by packet.
UDP Messenger
A desktop chat experiment with direct messages, group broadcast, and retrieval of stored conversations.
- Java
- Swing
- DatagramSocket
- Threads
Public source

An interface over a protocol
Swing clients send datagrams to a server. Login and message handling are distinct flows, client handlers run on threads, and group membership is maintained separately from direct-message recipients.
A little persistence
The server stores conversation history in files and sends older messages when a client joins. The code makes the path from a user action to a packet, a handler, and a visible message unusually direct.
CLIENT A ── UDP ──► SERVER ── UDP ──► CLIENT B
│
conversation log
│
GROUP BROADCASTFrom a button press to a delivered datagram.
- 01 / sender
Client · Swing
Login / send / join group
Client DatagramSocket
- login datagram → 2. Server · login socket
- message datagram → 3. clientHandler
- 02 / port 1776
Server · login socket
Register name and address
Create clientHandler thread
- register → 4. Client + group maps
- 03 / port 9999
clientHandler
Receive / parse datagram
Direct recipient or group
- store / retrieve → 5. chat_logs
- direct / group delivery → 6. Client · receiver
- 04 / routing state
Client + group maps
Names → address / port
Group memberships
- resolve destination → 3. clientHandler
- 05 / filesystem
chat_logs
Write conversation files
Read earlier messages
- 06 / recipient
Client · receiver
Receive datagram
Append to conversation view
- 1Client · Swing Server · login socketlogin datagram
- 2Server · login socket Client + group mapsregister
- 3Client · Swing clientHandlermessage datagram
- 4Client + group maps clientHandlerresolve destination
- 5clientHandler chat_logsstore / retrieve
- 6clientHandler Client · receiverdirect / group delivery
Read from the implementation
Client.javaServer.java · clientHandlerclientDriver.java / serverDriver.java
A conversation on the local machine
The film runs two clients and a server on loopback using new test messages. Delivery is checked in the receiving client before the capture proceeds. A routing bug caused shared-socket handlers to use their own recipient instead of the packet recipient; this was repaired in the isolated capture copy, along with history attribution. The historical repository is unchanged.
The boundary of the experiment
This is a networking study. Authentication, transport security, and delivery guarantees are not claimed. The recording contains only locally generated test conversations.