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] QLocalSocket::flush returns false, but sends data

[SOLVED] QLocalSocket::flush returns false, but sends data

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

    Greetings,

    In our project we're using server and socket for interprocess communication. But there's a strange thing occurs - sometimes QLocalSocket::flush() returns false. But data succesfully outgoes (I receive that data on client). Socket's errorString method returns "Unknown error". What can it be?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      "bool QLocalSocket::​flush()":http://doc.qt.io/qt-5/qlocalsocket.html#flush returns true If any data was written; otherwise false is returned.

      So, in your case it means that flush did not send any data to a socket.
      Why? Because all data already been sent by OS.

      [EDIT]: "Unknow socket error" is a default value for socketError

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nikitablack
        wrote on last edited by
        #3

        Got this. Thank you.

        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