title: Java application fail to send data to UDP server at localhost
body: <p>I have this small code which is supposed to send data to UDP server and to recieve response data:</p>
  
  <pre><code>import java.io.IOException;
  import java.net.DatagramPacket;
  import java.net.DatagramSocket;
  import java.net.InetAddress;
  
  public class TestRcon {
      private static DatagramSocket ds;
  
      public static void main(String[] args) {
          try {
              ds = new DatagramSocket(27024);
              byte[] data;
  
              data = new String("ÿÿÿÿrcon pass status").getBytes();
  
              System.out.println("Send:" + new String(data));
  
              DatagramPacket dp = new DatagramPacket(data, 0, data.length,
                      InetAddress.getByName("88.88.88.88"), 28960);
  
              ds.send(dp);
              byte[] rec = new byte[1024];
              DatagramPacket dp2 = new DatagramPacket(rec, 1024);
              ds.receive(dp2);
  
              System.out.println("Recieve:" + new String(rec));
  
              ds.close();
          } catch (IOException e) {
                  e.printStackTrace();
          } finally {
              if (ds != null)
                  ds.close();
          }
  
      }
  }
  </code></pre>
  
  <p>When I send data from my computer to server computer where UDP server runs, everything works fine. But when I run same Java application on that server computer (correct me if I'm wrong, but in that case application treats UDP server as it runs at localhost) nothing happens.</p>
  
  <p>Few infos:</p>
  
  <ol>
  <li><p>I tried to pass: localhost, 127.0.0.1, InetAddress.getLocalHost() instead of 88.88.88.88. Didn't help.</p></li>
  <li><p>There is already one application that runs successfully on server and sends data to UDP server.</p></li>
  </ol>
  
  <p>What could be wrong? Thanks in advance.</p>