Network Chat Application
Systems Programming · TCP Client-Server Messaging
About
A TCP-based client-server chat application that enables real-time public and private messaging. Built entirely in C, the system relies on a custom binary protocol and utilizes I/O multiplexing to efficiently handle concurrent users and network communication without the overhead of multithreading or forking.
Key Highlights
—Designed and implemented a lightweight custom binary protocol using 16-bit headers for control messages and 32-bit headers for chat messages.
—Leveraged the select() system call for robust I/O multiplexing on both the client and server sides to monitor multiple sockets and standard input simultaneously.
—Implemented advanced data handling features, including message chunking for payloads over 2000 bytes, partial message buffering, and graceful disconnect management.
—Built a configurable GNU Make build system and utilized unit testing, GDB, and Valgrind to ensure memory safety and accurate header parsing.


