Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71730

QAbstractSocket cannot receive empty (zero-length) datagrams in unix

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Out of scope
    • Affects Version/s: 5.12.0 Beta 4, Some future release
    • Fix Version/s: None
    • Component/s: Network: Sockets
    • Labels:
      None
    • Platform/s:
      Linux/Wayland, Linux/X11, Linux/Other display system

      Description

      QAbstractSocket implementation for unix platform uses system call read() instead of recv() for receiving incoming data (regardless of socket type).

      But there are difference between them described in man recv(2):

      If a zero-length datagram is pending, read(2) and recv() <...> provide different behavior. In this circumstance, read(2) has no effect (the datagram remains pending), while recv() consumes the pending datagram.

      It means that QAbstractSocket initialized with socket descriptor of SOCK_DGRAM type cannot be used to receive datagrams properly.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              artem_pisarenko Artem Pisarenko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes