View Full Version : Unicast with QUdpSocket
bryang
15th February 2011, 03: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.
Thanks!
ChrisW67
15th February 2011, 04: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?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.