85 |
*/ |
*/ |
86 |
private static InetAddress inaddr_any; |
private static InetAddress inaddr_any; |
87 |
|
|
88 |
|
/** dummy InetAddress, used to bind socket to any (all) network interfaces */ |
89 |
|
static InetAddress ANY_IF; |
90 |
|
|
91 |
/** |
/** |
92 |
* The size of the cache |
* The size of the cache |
93 |
*/ |
*/ |
128 |
// Create the cache |
// Create the cache |
129 |
if (cache_size != 0) |
if (cache_size != 0) |
130 |
cache = new Hashtable(cache_size); |
cache = new Hashtable(cache_size); |
131 |
|
|
132 |
|
// precompute the ANY_IF address |
133 |
|
try |
134 |
|
{ |
135 |
|
ANY_IF = getInaddrAny(); |
136 |
|
} |
137 |
|
catch (UnknownHostException uhe) |
138 |
|
{ |
139 |
|
// Hmmm, make one up and hope that it works. |
140 |
|
int[] zeros = {0,0,0,0}; |
141 |
|
ANY_IF = new InetAddress(zeros); |
142 |
|
} |
143 |
} |
} |
144 |
|
|
145 |
/*************************************************************************/ |
/*************************************************************************/ |