426 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
427 |
* @exception SecurityException If a security manager exists and its |
* @exception SecurityException If a security manager exists and its |
428 |
* checkConnect or checkMulticast method doesn't allow the operation |
* checkConnect or checkMulticast method doesn't allow the operation |
429 |
|
* |
430 |
|
* @deprecated |
431 |
*/ |
*/ |
432 |
public synchronized void send(DatagramPacket p, byte ttl) throws IOException |
public synchronized void send(DatagramPacket p, byte ttl) throws IOException |
433 |
{ |
{ |
434 |
SecurityManager s = System.getSecurityManager(); |
SecurityManager s = System.getSecurityManager(); |
435 |
if (s != null) |
if (s != null) |
436 |
{ |
{ |
437 |
InetAddress addr = p.getAddress(); |
InetAddress addr = p.getAddress(); |
438 |
if (addr.isMulticastAddress()) |
if (addr.isMulticastAddress()) |
439 |
s.checkMulticast(addr, ttl); |
s.checkPermission (new SocketPermission |
440 |
else |
(addr.getHostName () + p.getPort (), |
441 |
s.checkConnect(addr.getHostAddress(), p.getPort()); |
"accept,connect")); |
442 |
|
else |
443 |
|
s.checkConnect(addr.getHostAddress(), p.getPort()); |
444 |
} |
} |
445 |
|
|
446 |
int oldttl = impl.getTimeToLive(); |
int oldttl = impl.getTimeToLive(); |