1 |
//---PACKAGE DECLARATION--- |
2 |
|
3 |
//---IMPORTS--- |
4 |
|
5 |
import java.net.*; |
6 |
|
7 |
/** |
8 |
* Provides low level network functions for JavaHost |
9 |
* <DETAILED DESCRIPTION> |
10 |
* |
11 |
* @author $Author: tdb1 $ |
12 |
* @version $Id: TemplateClass.java,v 1.5 2000/11/13 18:20:09 tdb1 Exp $ |
13 |
*/ |
14 |
class LowLevelNet { |
15 |
|
16 |
//---FINAL ATTRIBUTES--- |
17 |
|
18 |
//---STATIC METHODS--- |
19 |
|
20 |
/** |
21 |
* sendUDPPacket - will attempt to send a UDP packet containing 'inText' to server |
22 |
* on the specificed port. |
23 |
*/ |
24 |
public static void sendUDPPacket( Config config, String inText ){ |
25 |
|
26 |
if ( inText.length() != 0 ){ |
27 |
|
28 |
// will throw an exception if an error occurs, so must bung it in a try |
29 |
// try { |
30 |
DatagramPacket udp = new DatagramPacket( inText.getBytes(), inText.length(), config.getFilterName(), config.getFilterUDPPort() ); |
31 |
// } |
32 |
//catch ( UnknownHostException e ){ |
33 |
// the serverName supplied could not be resolved using dns |
34 |
// } |
35 |
} |
36 |
} |
37 |
|
38 |
//---CONSTRUCTORS--- |
39 |
|
40 |
//---PUBLIC METHODS--- |
41 |
|
42 |
//---PRIVATE METHODS--- |
43 |
|
44 |
//---ACCESSOR/MUTATOR METHODS--- |
45 |
|
46 |
//---ATTRIBUTES--- |
47 |
|
48 |
//---STATIC ATTRIBUTES--- |
49 |
|
50 |
} |