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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • None
    • 5.12.0 Beta 4, Some future release
    • Network: Sockets
    • None
    • 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

            tpochep Timur Pocheptsov
            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