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. [SOLVED] TCP Communication
QtWS25 Last Chance

[SOLVED] TCP Communication

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 899 Views
  • 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.
  • R Offline
    R Offline
    rizoritis
    wrote on last edited by
    #1

    Hello,

    I have a very basic question. After I set up my server and have connected to a client do I have to continuously (synchronously) poll for data from my client or does Qt know that when there is data to send a signal that I can then call client->read() from? If I don't have to keep polling for data then I dont want to waste processing power doing so.

    Thanks!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      QTcpSocket does send a "readyRead":http://qt-project.org/doc/qt-5/qiodevice.html#readyRead signal when something has been received.

      Probably the best for you is to checkout the "fortune server":http://qt-project.org/doc/qt-5/qtnetwork-fortuneserver-example.html and "client":http://qt-project.org/doc/qt-5/qtnetwork-fortuneclient-example.html examples.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rizoritis
        wrote on last edited by
        #3

        Thanks koahnig!

        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