View Full Version : Unicast with QUdpSocket

15th February 2011, 04:04
Can the QUdpSocket class be set up to natively support UDP Unicast communications? I can't seem to find anything in the documentation...or maybe I just don't know what I'm looking for. An example would be great.


15th February 2011, 05:29
Unicast is a one-to one association between the client and the server: that's the normal mode of operation for a socket.

Use bind() to listen for datagrams, readDatagram() to read received data, and writeDatagram() to send data. It's all in the QUdpSocket page and the linked Broadcast examples (just use a single address rather than the broadcast address).

Have I missed something in your question?