Summary
I developed a chat server using the client server model in C that is able to support 32 live users over TCP and UDP connections.
Tools: C, Linux, Socket Programming
The Process
For my Operating Systems course, I was tasked with implementing a chat server that was able to support more multiple in-coming client connections. I used multi-threading as the solution to supporting multiple clients at the same time.
If we are creating a connection between a client and server, then using the TCP protocol is a good option. TCP arranges packets in the order they are specified and there is
a gurantee that the data transferred remains intact. We also get the benefits of error checking and recovery and flow control from it's famous three-way handshake.
Interestingly enough, I had to support both TCP and UDP connections. The way I was able to tackle this was to use the Linux system call select() to poll between the TCP and UDP socket.