Skip to content
Snippets Groups Projects
Commit a0674bed authored by Brutzman, Don's avatar Brutzman, Don
Browse files

sleep delay, warning

parent 39e28599
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ public class TcpExample3Client {
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
public static void main(String[] args) throws InterruptedException {
// Local variables/fields
Socket socket = null;
......@@ -64,7 +64,9 @@ public class TcpExample3Client {
System.out.println("The message the server sent was: '" + serverMessage + "'");
// socket gets closed, either automatically/silently by this code (or possibly by the server)
} // end while(true)
Thread.sleep(500l); // slow things down, for example 500l (long) = 500 msec
} // end while(true) // infinite loops are dangerous, be sure to kill this process!
}
catch (IOException e)
{
......
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