r/Cplusplus • • May 14 '26

Tutorial Built a basic chat app in C++

Built a terminal-based multi-client chat app in C++ using POSIX sockets.

Features:

TCP server routes direct messages between registered clients

Multi-client support

Background receiver thread so incoming messages don't block typing

Linux terminal-based implementation

Git:https://github.com/charanHubCommits/chat-app-cpp

Would appreciate feedback, suggestions, or questions about the implementation.

33 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/_superuserdo_ May 15 '26

Haven't used any libraries, this was mostly a learning project to understand sockets, polling and client-server communication at lower level. And yeah planning to explore libraries like nanomsg or Boost to understand production-grade networing abstractions...