ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/java/LowLevelNet.java
(Generate patch)

Comparing projects/cms/source/host/java/LowLevelNet.java (file contents):
Revision 1.2 by ab11, Mon Nov 27 20:36:24 2000 UTC vs.
Revision 1.5 by tdb, Wed Jan 24 01:25:59 2001 UTC

# Line 3 | Line 3
3   //---IMPORTS---
4  
5   import java.net.*;
6 + import java.io.*;
7  
8   /**
9   * Provides low level network functions for JavaHost
# Line 24 | Line 25 | class LowLevelNet {
25      public static void sendUDPPacket( Config config, String inText ){
26          
27          if ( inText.length() != 0 ){
28 <        
28 >            //System.out.println("SENT: "+inText);
29              // will throw an exception if an error occurs, so must bung it in a try
30 <            // try {
30 >            try {
31                  DatagramPacket udp = new DatagramPacket( inText.getBytes(), inText.length(), config.getFilterName(), config.getFilterUDPPort() );
32 <            // }
33 <            //catch ( UnknownHostException e ){
34 <                // the serverName supplied could not be resolved using dns
35 <            // }
32 >                DatagramSocket sendSoc = new DatagramSocket();
33 >                sendSoc.send(udp);
34 >            }
35 >            catch ( SocketException e ){
36 >               // the serverName supplied could not be resolved using dns
37 >            }
38 >            catch ( IOException e ){
39 >                // problem sending..    
40 >            }
41          }
42      }
43  
# Line 47 | Line 53 | class LowLevelNet {
53  
54   //---STATIC ATTRIBUTES---
55  
56 < }
56 > }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines