Bidirectional Communication via terminal command line
to run, first open two terminals (whether it would be terminal, command prompt, powershell) compile and run TextServer.java first, this will create a listening socket
javac TextServer.java java TextServer
or
java TestServer.java
then, run and compile TextClient, and begin exchanging messages
javac TextClient.java java TextClient
or
java TextClient.java