Question: Network 1. Write a Java TCP socket program (Server and Client) that does the following: Server 1.1 Ask user to enter name of server start

 Network 1. Write a Java TCP socket program (Server and Client)

Network

1. Write a Java TCP socket program (Server and Client) that does the following: Server 1.1 Ask user to enter name of server start up file: server.txt (see example below) 1.2 Read the server start up file 1.2.1 Initialize the server node number, edge weights, and the initial routing table RT 1.3 Listen on TCP port 12121 for a client to connect 1.4 When a client connects 1.4.1 Read the client node number 1.4.2 Read the number of DVR entries from client 1.4.3 Read each DVR entry from client and use the DVR algorithm to update current RT based on DVR entry 1.4.4 After all DVR entries from client are read, print the server node number, client node number (client who sent DVR entries) and updated RT as in the example below: Server node number 7 Client node number 4 next ho 0 4 17 25 server.txt server.txt contains (see example) Server node number Number of edge weights Edge weights one per line: nbrdist Number of routing table (RT) entries RT entries one per line: dest next hop dist 6 5 700 Client is run twice. User enters client1.txt the first time and client2.txt the second time. 1.1 Ask user to enter name of client start up file: clientl.txt 1.2 Read the client start up file 1.3 Connect to server on TCP port 12121 1.4 Send the client node number to server 1.5 Send the number of DVR entries to server 1.6 Send each DVR entry to server clientl.txt and client2 .txt contain (see examples) Client node number Number of DVR entries DVR entries one per line: dest dist client1.txt 4 4 40 3 11 2 14 6 22 client2.txt 6 4 6 0 3 2 2 5 5 11 1. Write a Java TCP socket program (Server and Client) that does the following: Server 1.1 Ask user to enter name of server start up file: server.txt (see example below) 1.2 Read the server start up file 1.2.1 Initialize the server node number, edge weights, and the initial routing table RT 1.3 Listen on TCP port 12121 for a client to connect 1.4 When a client connects 1.4.1 Read the client node number 1.4.2 Read the number of DVR entries from client 1.4.3 Read each DVR entry from client and use the DVR algorithm to update current RT based on DVR entry 1.4.4 After all DVR entries from client are read, print the server node number, client node number (client who sent DVR entries) and updated RT as in the example below: Server node number 7 Client node number 4 next ho 0 4 17 25 server.txt server.txt contains (see example) Server node number Number of edge weights Edge weights one per line: nbrdist Number of routing table (RT) entries RT entries one per line: dest next hop dist 6 5 700 Client is run twice. User enters client1.txt the first time and client2.txt the second time. 1.1 Ask user to enter name of client start up file: clientl.txt 1.2 Read the client start up file 1.3 Connect to server on TCP port 12121 1.4 Send the client node number to server 1.5 Send the number of DVR entries to server 1.6 Send each DVR entry to server clientl.txt and client2 .txt contain (see examples) Client node number Number of DVR entries DVR entries one per line: dest dist client1.txt 4 4 40 3 11 2 14 6 22 client2.txt 6 4 6 0 3 2 2 5 5 11

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!