PDA

View Full Version : QUdpSocket bind / connectToHost ?



mnemonic_fx
27th June 2007, 01:46
Hi everyone,

I'm asking a basic question about what is the difference, when we use bind / connectToHost on QUdpSocket.

The manual says I could use read & write function after connectToHost, no difference than QTcpSocket.

But when I experimenting with it, on one application I experienced an anomaly,
which is I don't receive readyRead() signal when data arrives at the network.
On another application, I use connectToHost, read & write with no problems.

I'm not sure what is the problem, since I call connectToHost & waitForConnected in both applications.

Additionally, I can use QUdpSocket bind, readDatagram & writeDatagram with no problems

So what causes this, and what are exactly the differences, advantages / disadvantages between these approach in using QUdpSocket ?

Help please :)

wysota
5th July 2007, 10:07
Does this another application also use udp sockets?

mnemonic_fx
17th July 2007, 03:20
Does this another application also use udp sockets?

Well, all of the udp sockets, uses QUdpSocket.

I'm not sure about your question. :confused:

Well at least can anybody explain to me if there is any differences between ordinary use of QUdpSocket (with datagram), compared to using QAbstractSocket ?