Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTcpSocket with signal capability
Qt 6.11 is out! See what's new in the release blog

QTcpSocket with signal capability

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hpng
    wrote on last edited by
    #1

    Hello:

    I like to know if there is a way for QTcpSocket to automatically (i.e. not polling it
    periodically using bytesAvailable() member function )
    sends a signal when it has receive data from remote host.
    So, I am looking for a signal function in QTcpSocket.

    I did not see any documentation on signals emitted (when its buffer has data) by QTcpSocket.
    I may have miss one. if there is any.
    Thanks.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      You should be able to connect to the readyRead() signal. It might originate from QIODevice, which means you don't see it in the QTcpSocket documentation.

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        QTcpSocket is a QAbstractSocket which is a QIODevice which has a "readyRead() signal":http://doc.qt.nokia.com/latest/qiodevice.html#readyRead.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          As a general rule: if you find that some method, signal, property... that you think should obviously be in a class isn't in the documentation for that class, you should either browse the documentation of the superclasses, or just click the "List of all members, including inherited members" link. There is a good chance you'll find what you are looking for in (abstract) base class.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved