Question: you should implement the TCPClient class in java! The first programming assignment is to implement a TCP client, called TCPAsk. TCPAsk operates in a straight-forward

 you should implement the TCPClient class in java! The first programming

you should implement the TCPClient class in java!

The first programming assignment is to implement a TCP client, called TCPAsk. TCPAsk operates in a straight-forward manner: 1. Open a TCP connection to a server at a given host address and port number. 2. Take any data that the server sends, and and print the data. 3. TCPAsk takes an optional string as parameter. This string is sent as data to the server when the TCP connection is opened, followed by a newline character (linefeed ' '). For example, assume we want to contact the "daytime" server at "time.nist.gov". The Daytime protocol is a standardised protocol for asking a Daytime server about the current date and time. Daytime runs at TCP port 13 by default. So we could use our program in the following way: $ java TCPAsk time.nist.gov 13 time.nist.gov:13 says: 58128 18-01-10 23:18:34 00 00 40.2 UTC (NIST) The first programming assignment is to implement a TCP client, called TCPAsk. TCPAsk operates in a straight-forward manner: 1. Open a TCP connection to a server at a given host address and port number. 2. Take any data that the server sends, and and print the data. 3. TCPAsk takes an optional string as parameter. This string is sent as data to the server when the TCP connection is opened, followed by a newline character (linefeed ' '). For example, assume we want to contact the "daytime" server at "time.nist.gov". The Daytime protocol is a standardised protocol for asking a Daytime server about the current date and time. Daytime runs at TCP port 13 by default. So we could use our program in the following way: $ java TCPAsk time.nist.gov 13 time.nist.gov:13 says: 58128 18-01-10 23:18:34 00 00 40.2 UTC (NIST)

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!