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. Network sync
Qt 6.11 is out! See what's new in the release blog

Network sync

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.4k 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.
  • V Offline
    V Offline
    Verminoz
    wrote on last edited by
    #1

    Hello,
    I am creating two applications that use the network tools of Qt. It is a server that listens to a port and a client that connects to the server. All is fine except for one thing. When I write and read both ways there's a syncronization problem. The clients sends the info but it takes a few seconds until they are actually read from the server. The same problem appears vice versa.

    Is there a way to ensure synchronization?

    Thank you in advance

    Ohne Muzik ware das Leben ein Irrtum.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vishwajeet
      wrote on last edited by
      #2

      How u r communicating ? over QLocalSocket or some other way?

      It does not take that much of time, whats the data size that u r communicating

      Born To Code !!!

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Verminoz
        wrote on last edited by
        #3

        I use QTcpServer and QTcpSocket and their inhereted QIODevice functions. I use the write and read functions and it takes a few seconds which is rather unacceptable. If I start a netcat conversation between the two computers communication is instant every time. The size of the data is small. Usually less than ten bytes at a time.

        Ohne Muzik ware das Leben ein Irrtum.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vishwajeet
          wrote on last edited by
          #4

          I m not sure what u have done but here you can try this.

          Go to <Ur installed Qt folder> /examples/network/fortuneclient and examples/network/fortuneServer directory

          these example uses QTcpSocket for communication, try and run this application and see if that also takes the same time ?

          Born To Code !!!

          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