A Windows desktop chat application with a C++ TCP server and a Dear ImGui client. Users can join with a name, see who is online, send group messages and open direct-message conversations. WinSock carries the messages; DirectX 11 draws the interface.
Client implementation · Server implementation · Sources and attribution
- Connects and disconnects clients using a configurable server IP, port and username.
- Broadcasts messages to the connected group and distributes an online user list.
- Routes private messages to the named recipient and echoes them to the sender.
- Uses a receiving thread so socket reads are separated from the client interface.
- Contains separate group/private notification hooks; the original WAV files are excluded because their redistribution terms are undocumented.
This is the networking portion of my WM9M4 Games Engineering coursework. My implementation focuses on the TCP server, text-message protocol, client connection and receive handling, and the chat interface layered over the Dear ImGui Win32/DirectX 11 example. Dear ImGui and its rendering backends remain third-party code, with their original MIT licence.
The project was extracted from a combined rasterizer/chatroom submission. This public snapshot contains the active client and server source, selected UI dependencies and Visual Studio projects. It preserves the original internal paths rather than moving the example's source files into a new layout. Original history is retained in the owner's private coursework archive.
| Technology or system | Role | Start reading |
|---|---|---|
| WinSock TCP | Accept connections and exchange bytes | Server.cpp |
| Newline-delimited protocol | Separate JOIN, MSG, DM and USERLIST messages | main.cpp, Server.cpp |
| C++ threads and mutexes | Receive messages and coordinate shared client state | The receive loop and client-management code in those files |
| Dear ImGui | Draw connection controls, chat history and private windows | main.cpp |
| Win32 / DirectX 11 | Windowing and UI rendering | backends |
Requirements: Windows x64, Visual Studio 2022 with Desktop development with C++, MSVC v143 and a Windows SDK. The active x64 projects use v143; Win32 configurations are not part of this verification.
From a Visual Studio Developer PowerShell at the repository root:
msbuild .\Server\Server.sln /m /p:Configuration=Release /p:Platform=x64
msbuild .\ClientGUI\examples\example_win32_directx11\example_win32_directx11.vcxproj /m /p:Configuration=Release /p:Platform=x64Run Server/x64/Release/Server.exe, then run two copies of ClientGUI/examples/example_win32_directx11/Release/example_win32_directx11.exe. For a local test, use IP 127.0.0.1, port 65432, and different usernames. Connect both clients, send a group message, then use the online user list to start a private conversation. Disconnect one client to observe the updated list.
On 11 October 2026, the split server and client passed Release x64 builds. A two-client TCP check verified joining, online lists, group delivery, direct delivery with sender echo, and removal after disconnect. This verifies the network protocol; the GUI interaction and notification playback have not been reverified during this extraction.
This is a coursework networking application, not a production chat service. Messages are plaintext and usernames are not authenticated. Notification WAV assets are not supplied; missing assets leave the intended notification sounds unavailable. Compiled outputs, IDE caches and unrelated Dear ImGui examples are excluded.
Dear ImGui's licence remains in ClientGUI/LICENSE.txt. See sources and attribution for the original coursework snapshot, third-party boundary and audio exclusions. No new whole-project licence is added.