Hi Wysota,

Well, I have been programming those small Multicast handlers both under Linux and Windows. Actually Winsock is based also on the BSD "Like" socket lib ( Not MFC, just Winsock ), and they use the same system calls.

Well I tried using QUdpSocket but it doesn't catch any Multicasted packet. Here a simple example of code provided by Trolltech:

Qt Code:
  1. QUdpSocket udpSocket = new QUdpSocket(this);
  2. udpSocket->bind(QHostAddress::LocalHost, 24001);
  3.  
  4. while (udpSocket->hasPendingDatagrams())
  5. {
  6. QByteArray datagram;
  7. datagram.resize(udpSocket->pendingDatagramSize());
  8. QHostAddress sender;
  9. quint16 senderPort;
  10.  
  11. udpSocket->readDatagram(datagram.data(), datagram.size(),
  12. &sender, &senderPort);
  13.  
  14. processTheDatagram(datagram);
  15. }
To copy to clipboard, switch view to plain text mode 

The problem here is pretty obvious : where do you join the multicast group ????

So I tried to put in the bind() function a QHostAddress containing the multicast address, but the bind function fails each time.

So, I don't know I do believe that Qt doesn't handle multicast by itself ?? Sad isn't it