I'm talking to a measurement instrument using tftp.

The funny thing about tftp protocol is that you connect to a server to a specified port, and the server responses from a different, connection specific port (which the server decides), which you then use in further communications.

With QUdpSocket you cannot get the new server port number. The documentation of peerPort() says 'Returns the port of the connected peer if the socket is in ConnectedState; otherwise returns 0.'

If you connect a QUdpSocket to a server for tftp protocol you never receive any data (at least I didn't). readyRead() never triggers, using a timer an polling the socket never reads anything.

If you don't connect and just send datagrams, you receive the replies, but as the socket is not in connected state, peerPort returns 0. (Why this limitation, if this could be lifted then QUdpSocket could be used???)

So, I ended up using Q3SocketDevice, this works, my problem is now solved.

But what happens when one day we get Qt5, which probably has Q4Support, but no Q3Support anymore... No tftp possible with Qt anymore ??

Maybe this ConnectedState limitation in peerPort() should be lifted ?