Results 1 to 3 of 3

Thread: QUdpSocket bind / connectToHost ?

  1. #1
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default QUdpSocket bind / connectToHost ?

    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
    Last edited by mnemonic_fx; 27th June 2007 at 01:49. Reason: typos

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QUdpSocket bind / connectToHost ?

    Does this another application also use udp sockets?

  3. #3
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QUdpSocket bind / connectToHost ?

    Quote Originally Posted by wysota View Post
    Does this another application also use udp sockets?
    Well, all of the udp sockets, uses QUdpSocket.

    I'm not sure about your question.

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.