title: How to have more processes listen on the same port of the same machine with QUdpSocket::ShareAddress?
body: <p>I'm on Linux with QT 4.8.</p>
  
  <p>I would like that 2 or more processes on the same machine could listen on the same port for UDP datagrams. Qt documentation says that QUdpSocket::ShareAddress can do that.</p>
  
  <p>I have implemented 2 receivers with this code:</p>
  
  <pre><code>connect(&amp;rec, SIGNAL(readyRead()), this, SLOT(leggiDati()));
  rec.bind(QHostAddress::any, 5000, QUdpSocket::ShareAddress);
  </code></pre>
  
  <p>the "leggiDati()" function:</p>
  
  <pre><code>while(rec.hasPendingDatagrams()){
    QByteArray dato;
    dato.resize(rec.pendingDatagramSize());
    rec.readDatagram(dato.data(), dato.size(), &amp;sender, &amp; port);
  }
  </code></pre>
  
  <p>and the sender code:</p>
  
  <pre><code>QUdpSocket send;
  QByteArray dato = "prova invio";
  send.writeDatagram(dato.data(), dato.size(), QHostAddress::LocalHost, 5000);
  </code></pre>
  
  <p>With the previous code, only the last process started receives the datagram. if I send a broadcast datagram, instead of on localhost, both processes receive the message.</p>
  
  <p>can anyone explain to me why this happens?
  Is there any way to permit communications on localhost avoiding to send broadcast messages?</p>