Code example for InetAddress

Methods: equals

0
              + clientAddress + " tcpConnectionIp=" + connectedClientIp + ". Ignoring the packet.");
    } 
  } 
   
  private static synchronized boolean isCorrectIp(InetAddress clientAddress) {
    return clientAddress.equals(connectedClientIp);
  } 
 
  public static synchronized void setConnectedClientIp(InetAddress clientIp) {
    connectedClientIp = clientIp;
  } 
   
  /** 
   * Sends a packet to the client identifying our server's name and ip. 
   *  
   * @param multicastSocket 
   * @param packet 
   * @param data 
   *          Byte 0 is the packet id, bytes 1 to 4 is an int identifying the 
   *          port of the client to which we should send a reply. 
   * @throws IOException