client server model using sockets

client server model using sockets
In this assignment, you will write a complete C application to support a client/server model using Linux sockets for a “messaging system”

The messaging system should be designed to allow multiple clients (at least 3, up to a max of 4) to connect to one central server that receive and,

• Broadcast each client message or payload to the rest of participating clients.

The server should be multi-threaded to boost its performance.

For instance, upon startup, the server should listen and wait for any client to connect to it. For each connected client, the server should:

➢ Acquire the client ID or screen-name via a simple handshake. Then,

➢ The server will relay/broadcast any received message/payload from the client to the group of participating clients.

➢ The server will continue to “listen” for clients and run indefinitely until manually terminated (using, for example , or via user defined means).

Whereas each client should connect to the server and then go into a loop. In this loop, the participating user should be able to type “message [text contents]”, “put
[file]”, or “quit”.

➢ The first option should cause the client to send the message text contents to the server, which in turn will broadcast the received client message to all other
participating clients stating that a certain client says: “the content of the text message”.

Identifying each arriving message, on any client by its originating source client by its ID/screen-name.

2 • The second option should copy the file/payload (i.e., text file, image, video, etc.) from the local client to the server, which in turn will forward it to each
participating client. Where, each participating client should have methods to listen for new inbound message and enter the group conversation as well.

• The third option exits the client, and

The server should notify the group that the client (by its ID/screenname) has left the chat.

Both client and server programs should run on the different systems. Where each client only need to know the IPs and ports to connect to and these programs should run
in separate directories so that file operations can be tested.

The client should report an appropriate error message if the file/payload to share with the group does not exist, or if it cannot connect to the server. Also, the
server should report to its last connected client if the server cannot find any other participating client or the connection has failed.

Order from us and get better grades. We are the service you have been looking for.