Skip to content
Snippets Groups Projects
Commit 8007f9a7 authored by John Furr's avatar John Furr
Browse files

Finished all requirements for homework 2.

parent e9e82c34
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ public class FurrTcpClient {
int x = 0; //for testing I have a iterator to close connection, if I get netbeans
//up and running will try with the open connection condition.
while (x < 10)//openConnection)
while (openConnection) //x<10 will also work.
{
System.out.println("\nType something to the server: ");
Scanner in = new Scanner(System.in); // gets input from console/output window
......
......@@ -85,10 +85,10 @@ public class FurrTcpServer {
{
//need check to see if
System.out.println("\n" + line);
ps.println("\tThe SERVER has responded with: " + responses[index]);
System.out.println("Server has sent: " + responses[index]);
index++;
System.out.println("\n" + line); //prints out what is recieved from client
ps.println("\tThe SERVER has responded with: " + responses[index]); //sends the prewritten response
System.out.println("Server has sent: " + responses[index]); //tells server user what was sent
index++; //goes to next response.
// Notice the use of flush() and close(). Without
// the close() to Socket object may stay open for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment