SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
In Java please
Command line execution: java cs280a1.hw3.TCPServer
Your server program will be provided with 3 arguments at the command line. The first argument
specifies
the port number that your server listens to. The second argument specifies the seed (an integer
number) that is used to initialize the Servers random number generator. The final argument,
number-
Of-Messages, specifies the number of messages that will be sent by each client that is connected
to the
server.
Your client program will be provided with 2 arguments at the command line. The two
arguments specify
the hostname and port-number where the Server is listening to for communications
1.1 Task 1: Server start-up The server should first check to see if it is able to successfully create
a server socket on the specified port. The value should be > 1024 <=65,535. You may encounter
an exception if a server socket currently is bound to that port number, print that exceptions
message using exception.getMessage(). Upon start-up the server should initialize its random
number generator using the specified seed.
1.2 Task 2: Upon start-up the clients should first connect to the Server. Provided you have
specified the correct
server host/port information and the server is currently running this will result in a successful
connection
to the server.
In one message the server side sends two integers to the client. The first integer specifies the
number
of messages that the server expects the client to send. This number is the argument that was
specified
to the server at its command line: you should not hard-code this number in your client-side code.
The second integer is a random number from the Server that is used to initialize the client-side
random
number generator.
1.3 Task 3: Sending messages from the client to the server
Once the registration process is complete. The client must do two things.
First, it must wait for 10 seconds. This wait is to allow you to start-up another client and connect
to the
server.
Second, the client is required to use its client-side random number generator to produce the
specified
number of messages. Each message is an integer that was produced using the random number
generator.
The client should also maintain a variable (long senderSum) which is used to maintain a running
sum
of all integer numbers that are being sent. Setting this variable as a long allows you to
circumvent any
overflow situations that would arise if you used an int instead.
The client should maintain a second variable (int numOfSentMessages) that tracks the number
of
messages that were sent by the client.
Tasks 1 and 2 should be completed. We will supply a compiled Client that can be used to
connect to
your server and will expect to receive one message with two integers. The first integer is the
number of
messages that the client should send back to the server. The second integer is the seed that
should be
used to initialize the clients random number generator.
Example Outputs:
Success
Server (Neptune):
Command: java cs280a1.hw3.TCPServer 1345 42 4
IP Address: neptune/129.82.44.122
Port Number 1345
waiting for client...
Clients Connected!
Sending config to clients...
earth.cs.colostate.edu -1170105035
jupiter.cs.colostate.edu 234785527
Finished sending config to clients.
Client A (Jupiter):
Command: java SubmissionOneClient neptune 1345
Received config
number of messages = 4
seed = 234785527
Client B (Earth):
Command: java SubmissionOneClient neptune 1345
Received config
number of messages = 4
seed = -1170105035
Port already in use
Server (Neptune):
Command: java cs280a1.hw3.TCPServer 1345 42 4
IP Address: neptune/129.82.44.122
Port Number 1345
Address already in use (Bind failed)
Task 3 should be completed. We will supply a Server that your client will connect to. The server
will
send the client one message with two integers. The first integer is the number of messages that
the
client should send back to the server. The second integer is the seed that should be used to
initialize
the clients random number generator. The client should then send that number of messages back
to
the server each containing one random integer. The client should maintain a count of messages
sent
along with the sum of the random numbers sent.
Example Output:
Server (Neptune):
Command: java cs280a1.hw3.SubmissionTwoServer 1345 42 30
IP Address: neptune/129.82.44.122
Port Number 1345
waiting for client...
Clients Connected!
Sending config to clients...
earth.cs.colostate.edu -1170105035
jupiter.cs.colostate.edu 234785527
Finished sending config to clients.
Starting to listen for client messages...
Finished listening for client messages.
earth.cs.colostate.edu
Messages received: 30
Sum received: -6382135587
jupiter.cs.colostate.edu
Messages received: 30
Sum received: -2496366311
Client A (Jupiter):
Command: java cs280a1.hw3.TCPClient neptune 1345
Received config
number of messages = 30
seed = 234785527
Starting to send messages to server...
Finished sending messages to server.
Total messages sent: 30
Sum of messages sent: -2496366311
Client B (Earth):
Command: java cs280a1.hw3.TCPClient neptune 1345
Received config
number of messages = 30
seed = -1170105035
Starting to send messages to server...
Finished sending messages to server.
Total messages sent: 30
Sum of messages sent: -6382135587

Weitere ähnliche Inhalte

Ähnlich wie In Java pleaseCommand line execution java cs280a1.hw3.TCPServer .pdf

9271736-Parasitic-computing.ppt for students reference
9271736-Parasitic-computing.ppt for students reference9271736-Parasitic-computing.ppt for students reference
9271736-Parasitic-computing.ppt for students referencePragnyaNandaSabat
 
Transmission control protocol
Transmission control protocolTransmission control protocol
Transmission control protocolSundra Anand
 
How a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfHow a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfarccreation001
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxAnkitKumar891632
 
Information gathering using windows command line utility
Information gathering using windows command line utilityInformation gathering using windows command line utility
Information gathering using windows command line utilityVishal Kumar
 
client-server communication using socket IPC
client-server communication using socket IPCclient-server communication using socket IPC
client-server communication using socket IPCNarayanlalMenariya
 
17 Spring 2018 Assignment 3 Chat server .docx
17   Spring 2018 Assignment 3 Chat server .docx17   Spring 2018 Assignment 3 Chat server .docx
17 Spring 2018 Assignment 3 Chat server .docxfelicidaddinwoodie
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdforderfabfirki
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxRunning Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxjoellemurphey
 

Ähnlich wie In Java pleaseCommand line execution java cs280a1.hw3.TCPServer .pdf (20)

Working of TCP
Working of TCP Working of TCP
Working of TCP
 
9271736-Parasitic-computing.ppt for students reference
9271736-Parasitic-computing.ppt for students reference9271736-Parasitic-computing.ppt for students reference
9271736-Parasitic-computing.ppt for students reference
 
Np unit iii
Np unit iiiNp unit iii
Np unit iii
 
Transmission control protocol
Transmission control protocolTransmission control protocol
Transmission control protocol
 
How a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdfHow a network connection is created A network connection is initi.pdf
How a network connection is created A network connection is initi.pdf
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptx
 
Information gathering using windows command line utility
Information gathering using windows command line utilityInformation gathering using windows command line utility
Information gathering using windows command line utility
 
Lecture9
Lecture9Lecture9
Lecture9
 
4. tcp header.ppt
4. tcp header.ppt4. tcp header.ppt
4. tcp header.ppt
 
Osi model
Osi modelOsi model
Osi model
 
Transport layer
Transport layerTransport layer
Transport layer
 
Transport layer
Transport layerTransport layer
Transport layer
 
client-server communication using socket IPC
client-server communication using socket IPCclient-server communication using socket IPC
client-server communication using socket IPC
 
Intake 37 12
Intake 37 12Intake 37 12
Intake 37 12
 
17 Spring 2018 Assignment 3 Chat server .docx
17   Spring 2018 Assignment 3 Chat server .docx17   Spring 2018 Assignment 3 Chat server .docx
17 Spring 2018 Assignment 3 Chat server .docx
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxRunning Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Ch09
Ch09Ch09
Ch09
 

Mehr von siva009113

In Chapter 2, a discussion of how social media influences the politi.pdf
In Chapter 2, a discussion of how social media influences the politi.pdfIn Chapter 2, a discussion of how social media influences the politi.pdf
In Chapter 2, a discussion of how social media influences the politi.pdfsiva009113
 
In March 2019, Zambia, a small open economy, lifted its export ban o.pdf
In March 2019, Zambia, a small open economy, lifted its export ban o.pdfIn March 2019, Zambia, a small open economy, lifted its export ban o.pdf
In March 2019, Zambia, a small open economy, lifted its export ban o.pdfsiva009113
 
in JavsScript we have folders and files. Which folder would these tw.pdf
in JavsScript we have folders and files. Which folder would these tw.pdfin JavsScript we have folders and files. Which folder would these tw.pdf
in JavsScript we have folders and files. Which folder would these tw.pdfsiva009113
 
IN JAVA PLEASEmake sure of the variables are correct and the s.pdf
IN JAVA PLEASEmake sure of the variables are correct and the s.pdfIN JAVA PLEASEmake sure of the variables are correct and the s.pdf
IN JAVA PLEASEmake sure of the variables are correct and the s.pdfsiva009113
 
IN C CODEGiven an IntNode struct and the operating functions for a.pdf
IN C CODEGiven an IntNode struct and the operating functions for a.pdfIN C CODEGiven an IntNode struct and the operating functions for a.pdf
IN C CODEGiven an IntNode struct and the operating functions for a.pdfsiva009113
 
In an agricultural experiment there are 25 varieties of maize, label.pdf
In an agricultural experiment there are 25 varieties of maize, label.pdfIn an agricultural experiment there are 25 varieties of maize, label.pdf
In an agricultural experiment there are 25 varieties of maize, label.pdfsiva009113
 

Mehr von siva009113 (6)

In Chapter 2, a discussion of how social media influences the politi.pdf
In Chapter 2, a discussion of how social media influences the politi.pdfIn Chapter 2, a discussion of how social media influences the politi.pdf
In Chapter 2, a discussion of how social media influences the politi.pdf
 
In March 2019, Zambia, a small open economy, lifted its export ban o.pdf
In March 2019, Zambia, a small open economy, lifted its export ban o.pdfIn March 2019, Zambia, a small open economy, lifted its export ban o.pdf
In March 2019, Zambia, a small open economy, lifted its export ban o.pdf
 
in JavsScript we have folders and files. Which folder would these tw.pdf
in JavsScript we have folders and files. Which folder would these tw.pdfin JavsScript we have folders and files. Which folder would these tw.pdf
in JavsScript we have folders and files. Which folder would these tw.pdf
 
IN JAVA PLEASEmake sure of the variables are correct and the s.pdf
IN JAVA PLEASEmake sure of the variables are correct and the s.pdfIN JAVA PLEASEmake sure of the variables are correct and the s.pdf
IN JAVA PLEASEmake sure of the variables are correct and the s.pdf
 
IN C CODEGiven an IntNode struct and the operating functions for a.pdf
IN C CODEGiven an IntNode struct and the operating functions for a.pdfIN C CODEGiven an IntNode struct and the operating functions for a.pdf
IN C CODEGiven an IntNode struct and the operating functions for a.pdf
 
In an agricultural experiment there are 25 varieties of maize, label.pdf
In an agricultural experiment there are 25 varieties of maize, label.pdfIn an agricultural experiment there are 25 varieties of maize, label.pdf
In an agricultural experiment there are 25 varieties of maize, label.pdf
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Kürzlich hochgeladen (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

In Java pleaseCommand line execution java cs280a1.hw3.TCPServer .pdf

  • 1. In Java please Command line execution: java cs280a1.hw3.TCPServer Your server program will be provided with 3 arguments at the command line. The first argument specifies the port number that your server listens to. The second argument specifies the seed (an integer number) that is used to initialize the Servers random number generator. The final argument, number- Of-Messages, specifies the number of messages that will be sent by each client that is connected to the server. Your client program will be provided with 2 arguments at the command line. The two arguments specify the hostname and port-number where the Server is listening to for communications 1.1 Task 1: Server start-up The server should first check to see if it is able to successfully create a server socket on the specified port. The value should be > 1024 <=65,535. You may encounter an exception if a server socket currently is bound to that port number, print that exceptions message using exception.getMessage(). Upon start-up the server should initialize its random number generator using the specified seed. 1.2 Task 2: Upon start-up the clients should first connect to the Server. Provided you have specified the correct server host/port information and the server is currently running this will result in a successful connection to the server. In one message the server side sends two integers to the client. The first integer specifies the number of messages that the server expects the client to send. This number is the argument that was specified to the server at its command line: you should not hard-code this number in your client-side code. The second integer is a random number from the Server that is used to initialize the client-side random number generator. 1.3 Task 3: Sending messages from the client to the server Once the registration process is complete. The client must do two things. First, it must wait for 10 seconds. This wait is to allow you to start-up another client and connect to the
  • 2. server. Second, the client is required to use its client-side random number generator to produce the specified number of messages. Each message is an integer that was produced using the random number generator. The client should also maintain a variable (long senderSum) which is used to maintain a running sum of all integer numbers that are being sent. Setting this variable as a long allows you to circumvent any overflow situations that would arise if you used an int instead. The client should maintain a second variable (int numOfSentMessages) that tracks the number of messages that were sent by the client. Tasks 1 and 2 should be completed. We will supply a compiled Client that can be used to connect to your server and will expect to receive one message with two integers. The first integer is the number of messages that the client should send back to the server. The second integer is the seed that should be used to initialize the clients random number generator. Example Outputs: Success Server (Neptune): Command: java cs280a1.hw3.TCPServer 1345 42 4 IP Address: neptune/129.82.44.122 Port Number 1345 waiting for client... Clients Connected! Sending config to clients... earth.cs.colostate.edu -1170105035 jupiter.cs.colostate.edu 234785527 Finished sending config to clients. Client A (Jupiter): Command: java SubmissionOneClient neptune 1345 Received config number of messages = 4
  • 3. seed = 234785527 Client B (Earth): Command: java SubmissionOneClient neptune 1345 Received config number of messages = 4 seed = -1170105035 Port already in use Server (Neptune): Command: java cs280a1.hw3.TCPServer 1345 42 4 IP Address: neptune/129.82.44.122 Port Number 1345 Address already in use (Bind failed) Task 3 should be completed. We will supply a Server that your client will connect to. The server will send the client one message with two integers. The first integer is the number of messages that the client should send back to the server. The second integer is the seed that should be used to initialize the clients random number generator. The client should then send that number of messages back to the server each containing one random integer. The client should maintain a count of messages sent along with the sum of the random numbers sent. Example Output: Server (Neptune): Command: java cs280a1.hw3.SubmissionTwoServer 1345 42 30 IP Address: neptune/129.82.44.122 Port Number 1345 waiting for client... Clients Connected! Sending config to clients... earth.cs.colostate.edu -1170105035 jupiter.cs.colostate.edu 234785527 Finished sending config to clients. Starting to listen for client messages... Finished listening for client messages.
  • 4. earth.cs.colostate.edu Messages received: 30 Sum received: -6382135587 jupiter.cs.colostate.edu Messages received: 30 Sum received: -2496366311 Client A (Jupiter): Command: java cs280a1.hw3.TCPClient neptune 1345 Received config number of messages = 30 seed = 234785527 Starting to send messages to server... Finished sending messages to server. Total messages sent: 30 Sum of messages sent: -2496366311 Client B (Earth): Command: java cs280a1.hw3.TCPClient neptune 1345 Received config number of messages = 30 seed = -1170105035 Starting to send messages to server... Finished sending messages to server. Total messages sent: 30 Sum of messages sent: -6382135587