/[classpath]/classpath/java/net/MulticastSocket.java
ViewVC logotype

Diff of /classpath/java/net/MulticastSocket.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mkoch, Thu Jan 16 07:54:49 2003 UTC revision 1.17 by mkoch, Sun Mar 2 20:31:56 2003 UTC
# Line 426  public class MulticastSocket extends Dat Line 426  public class MulticastSocket extends Dat
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();

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26