To connect and disconnect a client to the server.
To build a connection between a client and the server, the ClientConnection builds a socket and specifies a DataInputStream and a PrintStream to the socket.
To disconnect a client to the server, the ClientConnection closes the DataInputStream and
PrintStream and then set DataInputStream, PrintStream, and the socket to null.
Constructors
ClientConnection has two constructors: One does nothing and the other takes the input parameters as the host machine and port and connect to that host machine.
Methods
connect: Connect to the specified host machine and port.
disconnect: Break the connection between the client and the server.
getOutputStream: Get the output PrintStream of the connecting socket.
getInputStream: Get the input DataInputStream of the connecting socket.