if (isClosed()) throw new SocketException("socket is closed");
  public synchronized void send(DatagramPacket p, byte ttl) throws IOException  {    SecurityManager s = System.getSecurityManager();    if (s != null)      {        InetAddress addr = p.getAddress();        if (addr.isMulticastAddress())          s.checkPermission (new SocketPermission                             (addr.getHostName () + p.getPort (),                              "accept,connect"));        else          s.checkConnect(addr.getHostAddress(), p.getPort());      }    int oldttl = impl.getTimeToLive();    impl.setTimeToLive(((int) ttl) & 0xFF);    impl.send(p);    impl.setTimeToLive(oldttl);  }