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
6eb529a9
Commit
6eb529a9
authored
10 months ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
warn if main() method invoked, not supported
parent
d35dc6fb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/TcpExamples/TcpExample4HandlerThread.java
+12
-3
12 additions, 3 deletions
examples/src/TcpExamples/TcpExample4HandlerThread.java
with
12 additions
and
3 deletions
examples/src/TcpExamples/TcpExample4HandlerThread.java
+
12
−
3
View file @
6eb529a9
...
@@ -31,9 +31,9 @@ public class TcpExample4HandlerThread extends Thread
...
@@ -31,9 +31,9 @@ public class TcpExample4HandlerThread extends Thread
/** The socket connection to a client */
/** The socket connection to a client */
Socket
socket
;
Socket
socket
;
/**
The thread constructor creates the socket from
/**
*
a ServerSocket, and passes one to the thread
*
The thread constructor creates the socket from a ServerSocket, waiting for the client to connect,
* responsible for handling the connection.
*
and passes that socket when constructing the thread
responsible for handling the connection.
*
*
* @param socket The socket connection handled by this thread
* @param socket The socket connection handled by this thread
*/
*/
...
@@ -41,6 +41,15 @@ public class TcpExample4HandlerThread extends Thread
...
@@ -41,6 +41,15 @@ public class TcpExample4HandlerThread extends Thread
{
{
this
.
socket
=
socket
;
this
.
socket
=
socket
;
}
}
/**
* Program invocation and execution starts here - but is illegal and unwanted, so warn the unsuspecting user!
* @param args command-line arguments
*/
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"*** TcpExample4HandlerThread is not a standalone executable progam."
);
System
.
out
.
println
(
"*** Please run TcpExample4DispatchServer instead... now exiting."
);
}
/** Handles one connection. We add an artificial slowness
/** Handles one connection. We add an artificial slowness
* to handling the connection with a sleep(). This means
* to handling the connection with a sleep(). This means
...
...
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