diff --git a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/.gitkeep b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Client.java b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Client.java index ce598f043e6cf5739dd387dea8f4c3b169c1cf8b..51e9bee475a11fff80faca8b6987b8fc8dce500a 100644 --- a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Client.java +++ b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Client.java @@ -1,4 +1,4 @@ -package MV3500Cohort2023MarchJune.Chojnacki; +package MV3500Cohort2023MarchJune.homework1.Chojnacki; import java.io.*; import java.net.*; @@ -81,7 +81,7 @@ public class Assignment1Client } catch (IOException | InterruptedException e) { - System.err.println("Problem with " + TcpExample3Client.class.getName() + " networking:"); // describe what is happening + System.err.println("Problem with " + Assignment1Client.class.getName() + " networking:"); // describe what is happening System.err.println("Error: " + e); // Provide more helpful information to user if exception occurs due to running twice at one time @@ -98,7 +98,7 @@ public class Assignment1Client // program exit: tell somebody about that happening. Likely cause: server drops connection. System.out.println(); - System.out.println(TcpExample3Client.class.getName() + " exit"); + System.out.println(Assignment1Client.class.getName() + " exit"); } } } diff --git a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ClientLog.txt b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ClientLog.txt new file mode 100644 index 0000000000000000000000000000000000000000..79f559779b62bd2eb11a29d6f89d91761d235c66 --- /dev/null +++ b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ClientLog.txt @@ -0,0 +1,53 @@ +ant -f C:\\x3d-nps-gitlab\\NetworkedGraphicsMV3500\\assignments -Dnb.internal.action.name=run.single -Djavac.includes=MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Client.java -Drun.class=MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client run-single +init: +Deleting: C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\built-jar.properties +deps-jar: +Updating property file: C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\built-jar.properties +Compiling 1 source file to C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\classes +warning: [options] system modules path not set in conjunction with -source 17 +1 warning +compile-single: +run-single: +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 1: We are connected to the server! +The message the server sent was: 'This is response 1 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 2: We are connected to the server! +The message the server sent was: 'This is response 2 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 3: We are connected to the server! +The message the server sent was: 'This is response 3 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 4: We are connected to the server! +The message the server sent was: 'This is response 4 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 5: We are connected to the server! +The message the server sent was: 'This is response 5 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 6: We are connected to the server! +The message the server sent was: 'This is response 6 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 7: We are connected to the server! +The message the server sent was: 'This is response 7 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 8: We are connected to the server! +The message the server sent was: 'This is response 8 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 9: We are connected to the server! +The message the server sent was: 'This is response 9 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client creating socket... +======================Assignment1=========================== +Client loop 10: We are connected to the server! +The message the server sent was: 'This is response 10 produced by the server, MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server' + +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Client exit +BUILD SUCCESSFUL (total time: 10 seconds) diff --git a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Server.java b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Server.java index 8b247258af9e0ae56adf3da9a485edfb3076c6df..0a43f50cf796b7619bbc2b4ad1fd2bb4448b3f92 100644 --- a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Server.java +++ b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Server.java @@ -1,4 +1,4 @@ -package MV3500Cohort2023MarchJune.Chojnacki; +package MV3500Cohort2023MarchJune.homework1.Chojnacki; import java.io.*; import java.net.*; @@ -85,7 +85,7 @@ public class Assignment1Server // Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54881 )) // Why is the first IP/port the same, while the second set has different ports? - System.out.println(TcpExample3Server.class.getName() + " socket pair showing host name, address, port:"); + System.out.println(Assignment1Server.class.getName() + " socket pair showing host name, address, port:"); System.out.println(" (( " + localAddress.getHostName() + "=" + localAddress.getHostAddress() + ", " + localPort + " ), ( " + remoteAddress.getHostName() + "=" + remoteAddress.getHostAddress() + ", " + remotePort + " ))"); @@ -104,7 +104,7 @@ public class Assignment1Server numberOfRequests++; } } catch (IOException e) { - System.err.println("Problem with " + TcpExample3Server.class.getName() + " networking: " + e); + System.err.println("Problem with " + Assignment1Server.class.getName() + " networking: " + e); // Provide more helpful information to user if exception occurs due to running twice at one time if (e instanceof java.net.BindException) { diff --git a/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ServerLog.txt b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ServerLog.txt new file mode 100644 index 0000000000000000000000000000000000000000..14049fd30e9d465d0afd5b88c80db3d03c7822bc --- /dev/null +++ b/assignments/src/MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1ServerLog.txt @@ -0,0 +1,43 @@ + +ant -f C:\\x3d-nps-gitlab\\NetworkedGraphicsMV3500\\assignments -Dnb.internal.action.name=run.single -Djavac.includes=MV3500Cohort2023MarchJune/homework1/Chojnacki/Assignment1Server.java -Drun.class=MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server run-single +init: +Deleting: C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\built-jar.properties +deps-jar: +Updating property file: C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\built-jar.properties +Compiling 1 source file to C:\x3d-nps-gitlab\NetworkedGraphicsMV3500\assignments\build\classes +warning: [options] system modules path not set in conjunction with -source 17 +1 warning +compile-single: +run-single: +MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server has started... +Server loop 1: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55884 )) + note HostName matches address if host has no DNS name +Server loop 2: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55885 )) + note HostName matches address if host has no DNS name +Server loop 3: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55886 )) + note HostName matches address if host has no DNS name +Server loop 4: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55887 )) + note HostName matches address if host has no DNS name +Server loop 5: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55888 )) + note HostName matches address if host has no DNS name +Server loop 6: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55889 )) + note HostName matches address if host has no DNS name +Server loop 7: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55890 )) + note HostName matches address if host has no DNS name +Server loop 8: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55891 )) + note HostName matches address if host has no DNS name +Server loop 9: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55892 )) + note HostName matches address if host has no DNS name +Server loop 10: MV3500Cohort2023MarchJune.homework1.Chojnacki.Assignment1Server socket pair showing host name, address, port: + (( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 2317 ), ( 0:0:0:0:0:0:0:1=0:0:0:0:0:0:0:1, 55893 )) + note HostName matches address if host has no DNS name +BUILD SUCCESSFUL (total time: 4 minutes 53 seconds) \ No newline at end of file