Question: Please code in C please Build a client and server that provide a distributed chat service. Users (clients) should be allowed to connect to your

Please code in C please

Build a client and server that provide a distributed chat service. Users (clients) should be allowed to connect to your server and specify a nickname to be used as an alias. Duplicates are not allowed.

-After connecting, all messages sent by any user should be broadcast to all other users currently connected. In addition, the server should inform all clients whenever a new user logs in.

For example, suppose that "Anne", "Beth", and "Claire" are currently logged in. If Anne enters "Hi Beth", then the server should broadcast "Anne: Hi Beth" to all other users, namely Beth and Claire. If another user, say "Dan", joins the chat session, then the server should inform Anne, Beth, and Claire by broadcasting the message "Dan has joined the chat".

-The first user to login should receive the message "You are the first user to join the chat".

-The chat service should be implemented using sockets and TCP.

-Don't worry about implementing client or server shutdown.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!