PDA

View Full Version : QUdpSocket - Multiple Network Interfaces



dbrmik
24th April 2009, 14:47
Hi

I have a server program which broadcasts packets on 10.255.255.255 using a network adaptor with IP 10.0.0.88 (subnet 255.0.0.0). The client program does not see any packets.

If I change the broadcast IP to 255.255.255.255, then it works OK. It appears my local address is 0.0.0.0. How can I change my local address so that my client looks for packets on a particular network interface?

I have tried setLocalAddress but I get the error

`void QAbstractSocket::setLocalAddress(const QHostAddress&)' is protected

How can I fix this?

Regards