Question: Write a java program to create a class named TCPClient to do the following steps: Create a socket for communicating with the server on a
Write a java program to create a class named TCPClient to do the following steps:
Create a socket for communicating with the server on a specific port.
Create an InputStream, and BufferedReader, to receive responses from the server.
Create an OutputStream, and PrintWriter, to send messages to the server.
Write to the OutputStream.
Read from the InputStream.
Close the InputStream, the OutputStream, and the socket before the client exits.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
