Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
97962805
Commit
97962805
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
more-verbose output for explanatory clarity
parent
f68471e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/src/TcpExamples/TcpExample4HandlerThread.java
+2
-1
2 additions, 1 deletion
examples/src/TcpExamples/TcpExample4HandlerThread.java
examples/src/TcpExamples/TcpExample4TerminalLog.txt
+68
-67
68 additions, 67 deletions
examples/src/TcpExamples/TcpExample4TerminalLog.txt
with
70 additions
and
68 deletions
examples/src/TcpExamples/TcpExample4HandlerThread.java
+
2
−
1
View file @
97962805
...
...
@@ -47,7 +47,8 @@ class TcpExample4HandlerThread extends Thread
PrintStream
ps
=
new
PrintStream
(
os
);
final
long
TIMEOUT
=
2000
;
// 2000 milliseconds = 2 seconds, 10000 milliseconds = 10 seconds
System
.
out
.
println
(
TcpExample4HandlerThread
.
class
.
getName
()
+
" pausing for TIMEOUT="
+
TIMEOUT
+
"ms"
);
// debug
System
.
out
.
println
(
TcpExample4HandlerThread
.
class
.
getName
()
+
" pausing for TIMEOUT="
+
TIMEOUT
+
"ms"
+
" to emulate computation and avoid server-side overload"
);
Thread
.
sleep
(
TIMEOUT
);
// ps is the PrintStream is the Java way to use System.print() to pass data along the socket.
...
...
This diff is collapsed.
Click to expand it.
examples/src/TcpExamples/TcpExample4TerminalLog.txt
+
68
−
67
View file @
97962805
Invocation instructions:
1. run/debug TcpExample4ThreadTcpExample4DispatchServerServer.java
2. don't run TcpExample4HandlerThread (since it is automatically launched as needed)
3. run/debug TcpExample4Client.java
Two program response logs, server and client:
===================================================
===================================================
run:
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=TcpExamples/TcpExample4DispatchServer.java -Drun.class=TcpExamples.TcpExample4DispatchServer run-single
run-single:
TcpExample4DispatchServer ready to accept socket connections...
=============================================================
TcpExample4DispatchServer.handlerThread invocation for connection #1...
TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExample4HandlerThread starting to handle a thread...
TcpExample4HandlerThread pausing for TIMEOUT=2000ms
TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExample4DispatchServer.handlerThread invocation for connection #2...
TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExample4HandlerThread starting to handle a thread...
TcpExample4HandlerThread pausing for TIMEOUT=2000ms
TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExample4DispatchServer.handlerThread invocation for connection #3...
TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExample4HandlerThread starting to handle a thread...
TcpExample4HandlerThread pausing for TIMEOUT=2000ms
TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExample4DispatchServer.handlerThread invocation for connection #4...
TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExample4HandlerThread starting to handle a thread...
TcpExample4HandlerThread pausing for TIMEOUT=2000ms
TcpExample4HandlerThread finished handling a thread, now exit.
BUILD STOPPED (total time: 42 seconds)
===================================================
===================================================
run:
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=TcpExamples/TcpExample4Client.java -Drun.class=TcpExamples.TcpExample4Client run-single
TcpExample4Client start, loop 4 times
==================================================
TcpExample4Client creating socket #1...
TcpExample4Client: message received from server='This message was written by the server TcpExample4HandlerThread'
TcpExample4Client: time msec required for read=2023
==================================================
TcpExample4Client creating socket #2...
TcpExample4Client: message received from server='This message was written by the server TcpExample4HandlerThread'
TcpExample4Client: time msec required for read=2003
==================================================
TcpExample4Client creating socket #3...
TcpExample4Client: message received from server='This message was written by the server TcpExample4HandlerThread'
TcpExample4Client: time msec required for read=2005
==================================================
TcpExample4Client creating socket #4...
TcpExample4Client: message received from server='This message was written by the server TcpExample4HandlerThread'
TcpExample4Client: time msec required for read=2005
==================================================
TcpExample4Client complete
BUILD SUCCESSFUL (total time: 9 seconds)
===================================================
Invocation instructions:
1. run/debug TcpExample4ThreadTcpExample4DispatchServerServer.java
2. don't run TcpExample4HandlerThread (since it is automatically launched as needed)
3. run/debug TcpExample4Client.java
Two program response logs, server and client:
===================================================
===================================================
run:
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=TcpExamples/TcpExample4DispatchServer.java -Drun.class=TcpExamples.TcpExample4DispatchServer run-single
run-single:
TcpExamples.TcpExample4DispatchServer ready to accept socket connections...
=============================================================
TcpExamples.TcpExample4DispatchServer.handlerThread invocation for connection #1...
TcpExamples.TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExamples.TcpExample4HandlerThread starting to handle a thread...
TcpExamples.TcpExample4HandlerThread pausing for TIMEOUT=2000ms to emulate computation and avoid server-side overload
TcpExamples.TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExamples.TcpExample4DispatchServer.handlerThread invocation for connection #2...
TcpExamples.TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExamples.TcpExample4HandlerThread starting to handle a thread...
TcpExamples.TcpExample4HandlerThread pausing for TIMEOUT=2000ms to emulate computation and avoid server-side overload
TcpExamples.TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExamples.TcpExample4DispatchServer.handlerThread invocation for connection #3...
TcpExamples.TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExamples.TcpExample4HandlerThread starting to handle a thread...
TcpExamples.TcpExample4HandlerThread pausing for TIMEOUT=2000ms to emulate computation and avoid server-side overload
TcpExamples.TcpExample4HandlerThread finished handling a thread, now exit.
=============================================================
TcpExamples.TcpExample4DispatchServer.handlerThread invocation for connection #4...
TcpExamples.TcpExample4DispatchServer.handlerThread is launched, awaiting another connection...
TcpExamples.TcpExample4HandlerThread starting to handle a thread...
TcpExamples.TcpExample4HandlerThread pausing for TIMEOUT=2000ms to emulate computation and avoid server-side overload
TcpExamples.TcpExample4HandlerThread finished handling a thread, now exit.
BUILD STOPPED (total time: 25 seconds)
===================================================
===================================================
run:
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run.single -Djavac.includes=TcpExamples/TcpExample4Client.java -Drun.class=TcpExamples.TcpExample4Client run-single
run:
TcpExamples.TcpExample4Client start, loop 4 times
==================================================
TcpExamples.TcpExample4Client creating socket #1...
TcpExamples.TcpExample4Client: message received from server='This message was written by the server TcpExamples.TcpExample4HandlerThread'
TcpExamples.TcpExample4Client: time msec required for read=2024
==================================================
TcpExamples.TcpExample4Client creating socket #2...
TcpExamples.TcpExample4Client: message received from server='This message was written by the server TcpExamples.TcpExample4HandlerThread'
TcpExamples.TcpExample4Client: time msec required for read=2008
==================================================
TcpExamples.TcpExample4Client creating socket #3...
TcpExamples.TcpExample4Client: message received from server='This message was written by the server TcpExamples.TcpExample4HandlerThread'
TcpExamples.TcpExample4Client: time msec required for read=2007
==================================================
TcpExamples.TcpExample4Client creating socket #4...
TcpExamples.TcpExample4Client: message received from server='This message was written by the server TcpExamples.TcpExample4HandlerThread'
TcpExamples.TcpExample4Client: time msec required for read=2011
==================================================
TcpExamples.TcpExample4Client complete
BUILD SUCCESSFUL (total time: 8 seconds)
===================================================
===================================================
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment