Results 1 to 2 of 2

Thread: QT - QTcpSocket read and write data continuously

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2018
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QT - QTcpSocket read and write data continuously

    I'm using QT 4.8.6 and I'm beginner level at QT. I look at the Fortune Client-Server Example. In this example , data send with button click action. But I want to sending data continuously in Server Side and reading this continuous data in Client Side. How can I implement this code in QT ?

    In Server Side :

    bool keepSending = true;

    while(keepSending)
    {
    ..
    writePacket();
    ..
    }

    In ClientSide :
    bool keepListening = true;

    while(keepListening )
    {
    ..
    readPacket();
    ..
    }
    Last edited by Ayse; 30th July 2018 at 13:16.

Similar Threads

  1. Blocking QTcpSocket for read/write operations
    By vcernobai in forum Qt Programming
    Replies: 3
    Last Post: 15th June 2020, 08:43
  2. QTcpSocket write():: How many data sends?
    By Daxos in forum Qt Programming
    Replies: 3
    Last Post: 29th July 2010, 10:27
  3. QTcpSocket write() Trasmission Data Design
    By Daxos in forum Qt Programming
    Replies: 4
    Last Post: 15th July 2010, 18:19
  4. read and write on qtcpsocket
    By dognzhe in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2009, 09:42
  5. QTcpSocket waiting for write to be read
    By spraff in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2008, 19:12

Tags for this Thread

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.