Description 1. Work This work aims to develop a Client-Server network solution (Figure 2). The solution to be implemented should support multiple users in a multi-threaded environment. The users will...

file is attached


Description 1. Work This work aims to develop a Client-Server network solution (Figure 2). The solution to be implemented should support multiple users in a multi-threaded environment. The users will not be logged in, being identified by the IP address used in the network. The solution will allow users to send messages to other users through the Server. 2. Features / Communication Protocol 2.1 Client - Server ● get whitelist of users ● get blacklist of users ● list users online ● sending a message to all online users ● sending a message to a particular online user ● disconnect 2.2 Server - Client ● Valid or invalid IP ● list whitelist of users ● list blacklist of users ● sending a message to all online users ● sending a message to a particular online user The response messages from the server should indicate success or failure of the operation, e.g. OK or ERROR. 3. Development 3.1 Server Implement a server that uses TCP/UDP sockets and a specific communication protocol. The message format of the application is defined according to point 3. Start the server by default on port 7142 for TCP communications and send messages to port 9031 for UDP communications. Sending messages to all online users or to a specific online user should use UDP unicast. The server must implement multi-threading, serving more than one client at a time. The Back-End server should keep the following information in file(s): ● A "white list" of valid IPV4 addresses or address classes for valid users (e.g. 192.168.10.10, 192.168.20.0/24). ● A "blacklist" of IPV4 addresses with users to reject (e.g. 192.168.10.21,192.168.20.22). If the white list is empty, there will be no validation of users' IP addresses, but all blacklisted clients will be rejected. If the same IP is on both lists (white and black), the black list will have priority. The server should terminate and print error messages on the console if errors are detected in the data files. For all communication activities with clients there should be an option to print to the server console and/or save to a log file. 3.2 Client TCP/UDP Implement a multi-threaded client that uses TCP/UDP sockets and a specific communications protocol used by the Server, according to the protocol established in point 3. Use by default port 7142 for TCP communications with the server, and port 9031 for UDP unicast communications. The client establishes a TCP communication with the server and starts a UDP client. Users do not send UDP messages directly to other clients, they always send them through the server. See Figure 1 for an example of client code execution. Fig.1 Example of Client execution 4. Exception handling The solution must be tolerant to short-term temporary failures on the TCP communication channel. That is, if the network or server is unavailable for a few moments, your application will receive an exception. This exception has to be handled on the client side in order to retry to open the socket with the server. The client cannot see that exceptions occur in its application. When there is no connection to the server the client should simply indicate that it is waiting for a connection to the server. If after 10 seconds the client still has no connection to the server, it should consider the connection as lost. During the time when the connection to the server is inactive all messages sent by clients and data entered by users must be kept in local buffers and must not be lost, but sent to the server as soon as it is active again. 5. Graphical Interface The solution uses command line for both clients and servers. 6. Solution Architecture The Client-Server architecture to be implemented will consist of a Server that receives commands from Clients via TCP sockets and UDP sockets to send messages to Clients. A white/black list on the Server defines valid/invalid IPs. Only Clients with valid IPs can communicate with the Server. Clients implement TCP sockets to send commands to the Server and UDP sockets to receive UDP messages sent by the Server. The Client software thus allows users to send messages to other users via the Server, using a specific communication protocol. Fig.2 - Solution Architecture
May 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here