SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); }
SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostAddress(), p.getPort()); }
  public synchronized void receive(DatagramPacket p) throws IOException  {    if (isClosed())      throw new SocketException("socket is closed");    if (remoteAddress != null && remoteAddress.isMulticastAddress())      throw new IOException	("Socket connected to a multicast address my not receive");    if (getChannel() != null && ! getChannel().isBlocking()        && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation())      throw new IllegalBlockingModeException();    getImpl().receive(p);		SecurityManager s = System.getSecurityManager();		if (s != null && isConnected())			s.checkAccept(p.getAddress().getHostName(), p.getPort());	}