Async Watcher Issue on Windows

Marc Lehmann schmorp at schmorp.de
Tue Feb 21 05:22:52 CET 2012


On Mon, Feb 20, 2012 at 04:05:11PM +0000, Anton Kirilov <akirilov at minervanetworks.com> wrote:
> > ... which is not the case (the socekt call does not specify that flag) ...
> I am sorry, but I disagree - from the socket() documentation ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms740506(v=vs.85).aspx ):
> 
> The socket that is created will have the overlapped attribute as a default.

WriteFile explicitly refers to FILE_FLAG_OVERLAPPED, which cannot be set
for sockets, at elast there is no known (to me) way to set it.

> In my understanding that is equivalent to specifying the flag in
> question implicitly, and my interpretation is consistent with the

The problem is that there are two overlapped flags - WSA_FLAG_OVERLAPPED and
FILE_FLAG_OVERLAPPED.

> behavior that I observe. In fact, judging by malek's comment, I am not
> alone.

Well, either behaviour or documentation is wrong - they can't be both
right.

However, something more sinister must be going on, as it apparently
depends on the environment you are in (msvc. vs. mingw. for example, or
probbaly os versions), otherwise we wouldn't see different behaviour.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list