Building a Chat App in C from Scratch (Ep. 7) | Chat Server, Simple Client & Socket Library Refactor

preview_player
Показать описание
In this episode, we build our full chat server, create a simple test client, and then refactor the server code into a reusable C socket library.

This is a huge milestone in the series — you’ll see how everything comes together from scratch and how we transform raw socket code into clean, modular components. This refactor sets the foundation for integrating our networking code into the SDL2 GUI in future episodes.

⏱️ Timestamps:
00:00 - Intro
01:06 - Building the Chat Server
13:00 - Writing a Simple Test Client
18:30 - Compiling & Running the Server + Client
24:37 - Making the Server Handle Multiple Clients
27:04 - Running the Multi-Client Setup
28:31 - Making the Code Cross-Platform (Windows, Linux & macOS)
36:26 - Refactoring into a Socket Library
1:09:09 - Testing the Socket Library + More Refactoring
1:12:01 - Debugging the Socket Library
1:24:08 - Solved the Bug! Final Tests
1:25:53 - Continuing the Refactor
1:35:01 - Final Test Run
1:39:12 - Outro

📚 What You’ll Learn:
- How to build a full server-client architecture in C
- How to structure a socket library
- Why modular socket code matters for GUI apps (like SDL2)

🔧 Tools Used:
- GCC
- Cross-platform terminal (Windows, Linux, macOS)

Next episode: We’ll build a proper client using this new socket library and start integrating it with our SDL2-based GUI.

👍 Like, comment, and subscribe if you’re enjoying the series!

#CProgramming #ChatApp #SocketProgramming #SDL2 #GUI #Networking #CrossPlatform
Рекомендации по теме
Комментарии
Автор

✅ In this episode:
We built a working server ✅
Tested it with a simple client 🧪
And refactored everything into a clean C socket library 🔥

➡️ Next episode:
Broadcasting messages + connecting our client to the SDL2 GUI 👀

💬 Got a cool name idea for this chat app?
Drop it below — I’ll pick the best one from the community 🙌

📺 Subscribe for more dev content — C, sockets, GUI, all of it!

thepcexpert
welcome to shbcf.ru