PDA

View Full Version : qudpsocket and localhost



ih8veggies
13th April 2009, 21:34
I have been using udpSocket.bind(12345) to listen for incoming packets from another piece of software, works great. But only if the software is sending to localhost. I would like to bind to the IP address (192.168.1.100) as I need to communicate between machines, but the code below returns success, but never sees a packet, what am I missing? It is on windows.

thanks,



QHostAddress addr(QHostAddress::QHostAddress("192.168.1.100"));
if(udpSocket.bind(addr,12345))
qDebug("success");
else
qDebug("fail");

mcosta
18th February 2011, 13:54
can you post the code where you send and receive datagrams?