1 |
import java.io.*; |
2 |
import java.net.*; |
3 |
import java.util.*; |
4 |
|
5 |
// This class runs a UDPReader thread for test purposes. |
6 |
// |
7 |
public class UDPReaderTestMain { |
8 |
|
9 |
public static void main(String[] args) throws InterruptedException{ |
10 |
|
11 |
System.out.println("About to start the UDPReader..."); |
12 |
|
13 |
Logger logger = new Logger(Logger.SYSMSG); |
14 |
UDPReader reader = new UDPReader(4589, logger); |
15 |
reader.start(); |
16 |
|
17 |
System.out.println("The UDPReader is now running as a thread."); |
18 |
|
19 |
boolean running = true; |
20 |
while (running){ |
21 |
Thread.sleep(5000); |
22 |
System.out.println("**** UDPReaderTestMain is still running..."); |
23 |
} |
24 |
|
25 |
} |
26 |
|
27 |
} |