Systems programming · Team of 2
Concurrent TCP/IP Chat System
A multiuser terminal messenger with simultaneous sending and receiving. I primarily developed the client and integrated it with my teammate’s threaded server.
- C
- TCP/IP
- POSIX
- Linux
Goal
Build a client-server application in C that lets multiple users exchange messages through a shared server without waiting to finish typing before receiving messages.
My Role
I mainly developed the client; my teammate mainly implemented the server. My work included client socket communication, simultaneous input/output, username validation, terminal interaction, and contributions to conversation logging and participant tracking.
How It Works
Separate sending and receiving
The client uses IPv4 TCP/IP sockets and POSIX multiprocessing: forking separate sending and receiving processes lets incoming messages appear while the user enters terminal input.
Integrate with a synchronized server
My teammate’s server uses POSIX threads and mutex locking to coordinate client tracking and message broadcasts. It is configured for up to eight concurrent connections.
Make the terminal usable
I added alphabetic username validation, prompt redisplay, and output flushing. I also contributed timestamped conversation logs and participant tracking after disconnects.
Testing & Debugging
We tested messaging with three clients connected at the same time. The server is configured for up to eight connections, but we haven’t tested that many.
Result
A working multiuser chat application, tested with three simultaneous client connections.