ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/server/XMLReader/UDPReader.java
(Generate patch)

Comparing experimental/server/XMLReader/UDPReader.java (file contents):
Revision 1.3 by pjm2, Fri Nov 17 15:25:48 2000 UTC vs.
Revision 1.4 by pjm2, Fri Nov 17 20:44:31 2000 UTC

# Line 37 | Line 37 | public class UDPReader {
37          
38          System.out.println("UDPReader ready and listening for UDP packets on port "+port);
39  
40 +        byte[] buf;
41 +        UDPReaderThread t = new UDPReaderThread();
42 +        
43          boolean running = true;
44          while (running){
45 +            System.gc();
46              try {
47 <                byte[] buf = new byte[packetSizeLimit];
47 >                buf = new byte[packetSizeLimit];
48                  // receive request
49                  DatagramPacket packet = new DatagramPacket(buf, buf.length);
50                  socket.receive(packet);
51 <                UDPReaderThread thread = new UDPReaderThread(packet);
48 <                thread.run();
51 >                t.run(packet);
52              }
53              catch (IOException e) {
54                  System.out.println("An exception occured in the UDPReader!");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines