Hello!
I've stumbled upon udp broadcast code which works on win32 and didn't work in x11.

Packet sender defined this way:
Qt Code:
  1. QSocketDevice * udp = new QSocketDevice(QSocketDevice::Datagram);
  2. #ifdef QTS_WIN32
  3. #elif QTS_LINUX
  4. int one = 1;
  5. setsockopt(udp->socket(), SOL_SOCKET, SO_BROADCAST, &one, sizeof(one));
  6. #endif
To copy to clipboard, switch view to plain text mode 
and it broadcasts packets this way:
Qt Code:
  1. udp->writeBlock(some-data, some-data.length(), broadcast-address, port);
To copy to clipboard, switch view to plain text mode 
Packet receiver defined this way:
Qt Code:
  1. QSocketDevice * udp = new QSocketDevice(QSocketDevice::Datagram);
  2. if(!udp->bind(some-address, port))
  3. {..}
  4. QSocketNotifier * udpn = new QSocketNotifier(udp->socket(), QSocketNotifier::Read);
  5. connect( udpn, SIGNAL( activated(int) ), this, SLOT( receiveSomething() ) );
To copy to clipboard, switch view to plain text mode 
When packet received, receiveSomething() fires and receiver mines data this way:
Qt Code:
  1. QString some-data = QString(udp->readAll());
To copy to clipboard, switch view to plain text mode 

Packet sender works on all platforms, but receiver only on win32. Does QSocketDevice on x11 need special initialization?