-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Can you try this patch? https://gist.github.com/saghul/a2da3e48433006669c43
On 07/08/2014 10:03 PM, Akhil Arora wrote: > On 7/8/2014 11:04 AM, Saúl Ibarra Corretgé wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> On 07/08/2014 07:24 PM, Akhil Arora wrote: >>> For an fd/SOCKET obtained externally to libuv, uv_tcp_open() >>> works fine on the unices, but throws an ENOTCONN on windows >>> when uv_read_start is called on the opened tcp handle. This >>> error is being generated by a call to uv__set_artificial_error >>> in uv_read_start(). Seems like UV_HANDLE_READABLE (and perhaps >>> WRITABLE) flags are not set on the handle. Should uv_tcp_open >>> do that, or is there another way to set these flags? This is >>> with libuv v0.10.27. Thanks in advance >>> >> >> Is the socket connected? Did you bind it? Can you provide a test >> case? > > Yes, the socket is connected and is functional. It was returned by > accept(), and a test message sent using send() just after the > accept() is received OK by the client. I hack around the artificial > ENOTCONN by setting the following flags on the opened tcp handle > before calling uv_read_start - > > tcp->flags |= 0x00002000; // uv/src/win/internal.h: > UV_HANDLE_CONNECTED tcp->flags |= 0x00008000; // > uv/src/win/internal.h: UV_HANDLE_READABLE tcp->flags |= 0x00010000; > // uv/src/win/internal.h: UV_HANDLE_WRITABLE > > I can try to write a test case, but at the moment I am having > trouble running the libuv tests (I have Visual Studio 2012 Express > installed, but it's being detected as 2010) - > > C:\Program Files > (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): > > error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset > = 'v100') cannot be found. To build using the v100 build tools, > either click the Project menu or right-click the solution, and > then select "Update VC++ Projects...". Install Visual Studio 2010 > to build using the Visual Studio 2010 build tools. > [D:\ws\node\deps\uv\libuv.vcxproj] > > VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio > 11.0\VC\ VISUALSTUDIOVERSION=11.0 VS110COMNTOOLS=C:\Program Files > (x86)\Microsoft Visual Studio 11.0\Common7\Tools\ > VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\ > VS_TOOLSET=x64 > - -- Saúl Ibarra Corretgé bettercallsaghul.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBAgAGBQJTvFJtAAoJEEEOVVOum8BZJnEQAND2Y0lZ1qbgyvgcrZEnf96M l8BGTlR1pMNuf9cj1BZhm2FqXlqpf9F3pKPtOws6ksebKbaRw0DNEP27DJTJp+60 xCwHy7q0pUpp++pjfTPQgJWONx9871E5Bj+gb0n6XzJuUa0E1LKtcEKKx8RyBWIh 22MsZMZyhEDtgOqe6NxLq6p4ZG6Ifyr4zJtCy+kVSkfUdnn86avoPAcBUGQmIZTj hdbv6X8A1m6dbK+zAZIh2/teTU1bBbFhq5xBtrSo+whoDUcIYev3k64GosJ2AZ3e ElonaJdHGBIOk+JYs0kGoxgx24eUZ/qRYbk+cE58l7h0WQUnmz5jioUoWMay63cZ Z5IOmbrjsTsBhFRl5CgW/Jp4wVPp9hz4335ZIorDqPyJ6M9JHol5eH2/0IQTXS5z SsiOir6jZidSpw10aKCkgL6yFTxNlaftwcrG+HQls8w1Zyw94jsi6DOsBd/VGhsO 0hy3zA7SYwuPiP6+UORzwSp+r/8FCCXQHVa8plhUBuxXUPIaSoJPJxQjRYFArTWp PLiMw4QB8PIYy+uAWanIe0pxli/QmGdVDs5H2sFuIWlIopVlt5vIU0mqbcsK9K6k wJzPh4Tu979tWwumY8d4lfVCxhdOpfNkGe/dqOPU3rp+CHu7qQOV1tKf4uNJA4sl Q0bOoyaT8ENz6K/tldcv =DYNb -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
