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.2 by pjm2, Fri Nov 17 12:16:39 2000 UTC vs.
Revision 1.3 by pjm2, Fri Nov 17 15:25:48 2000 UTC

# Line 25 | Line 25 | public class UDPReader {
25              }
26          }
27  
28 <        DatagramSocket socket = new DatagramSocket(port);
28 >        DatagramSocket socket = null;
29 >        try {
30 >            socket = new DatagramSocket(port);
31 >        }
32 >        catch (BindException e){
33 >            System.out.println("Some other process is already listening on port "+port+".");
34 >            System.out.println("Please specify another port number on the command line.");
35 >            System.exit(0);
36 >        }
37 >        
38          System.out.println("UDPReader ready and listening for UDP packets on port "+port);
39  
40          boolean running = true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines