Core ReactOS
  1. Core ReactOS
  2. CORE-12152

WSA connect doesn't work corretly in nonblocking mode

    Details

    • Sprint:
      December 2016

      Description

      Connecting socket in nonblocking mode into localhost continued by WSAEnumNetworkEvents doesn't work correctly.

      Windows connect() function always return value SOCKET_ERROR, and WSAGetLastError return WSAEWOULDBLOCK, to continue with WSAEnumNetworkEvents configured by WSAAsyncSelect/WSAEventSelect, ReactOS WSA does not.

      Simple client/server application is attached to test connecting.

      Tested with ReactOS 20161013-r72963 in VirtualBox 5.0.20

      (ReactOS seems sometimes (but not always) hang, when trying attached sample)

      1. CORE-12152_2.patch
        0.7 kB
        hater
      2. CORE-12152.patch
        50 kB
        hater
      3. r73321-playedABitWithCORE-12152patchFromState2016-11-19.log
        1.19 MB
        reactosfanboy
      4. WSAAsync_2.patch
        6 kB
        hater
      5. WSAAsync.c
        6 kB
        hater
      6. WSAAsyncTest.c
        9 kB
        Miroslav Mastný

        Activity

        Hide
        hater
        added a comment -

        I'm did a change to test a switch to udns, but lately I don't have enough time unfortunately to finish it.
        And based on feedback implementation shows improvements, but also regressions on DNS searches, so for now - no real update.

        Show
        hater
        added a comment - I'm did a change to test a switch to udns, but lately I don't have enough time unfortunately to finish it. And based on feedback implementation shows improvements, but also regressions on DNS searches, so for now - no real update.
        Hide
        Zero3K
        added a comment -

        What kind of improvements?

        Show
        Zero3K
        added a comment - What kind of improvements?
        Hide
        reactosfanboy
        added a comment -

        Improvements: programs that open a ton of connections in a short time (like uTorrent) are speed up extremely and do no longer block the GUI.
        Drawbacks: DNS resolving does not work reliable anymore due to needed improvements otherwhere. Hater already explained both.

        Show
        reactosfanboy
        added a comment - Improvements: programs that open a ton of connections in a short time (like uTorrent) are speed up extremely and do no longer block the GUI. Drawbacks: DNS resolving does not work reliable anymore due to needed improvements otherwhere. Hater already explained both.
        Hide
        Zero3K
        added a comment -

        I'm writing about udns. Not the patch that is provided here.

        Show
        Zero3K
        added a comment - I'm writing about udns. Not the patch that is provided here.
        Hide
        hater
        added a comment -

        Switch to udns is not an improvement in anyway, but a mean to mitigate DNS resolving regressions when using adns with non-blocking mode, so that we can commit it and move ahead.
        Real needed implementation is drop any external resolver and fully implement dnsapi as a real DNS resolver as it should be. Now it just delegates search to adns/udns and translates the result, so it is basically a wrapper.

        Show
        hater
        added a comment - Switch to udns is not an improvement in anyway, but a mean to mitigate DNS resolving regressions when using adns with non-blocking mode, so that we can commit it and move ahead. Real needed implementation is drop any external resolver and fully implement dnsapi as a real DNS resolver as it should be. Now it just delegates search to adns/udns and translates the result, so it is basically a wrapper.

          People

          • Assignee:
            hater
            Reporter:
            Miroslav Mastný
          • Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:

              Agile