Windows Compilation problem

Chris Hulbert chris.hulbert at gmail.com
Fri Jun 6 02:35:04 CEST 2008


FYI, i just had the same problem.
To convert from a socket to a file descriptor, you'll need to use this function:

  // for win32: convert from socket to file descriptor
  // // http://msdn.microsoft.com/en-us/library/bdts1c9x(VS.71).aspx
  int fd = _open_osfhandle(socket,0);

On Thu, Jun 5, 2008 at 6:23 PM, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Wed, Jun 04, 2008 at 04:29:46PM -0700, Matt Tolton <matt at tolton.com> wrote:
>> Any pointers here?  The fd that I'm using is a socket obtained from
>> the winsock socket() call.  Here is the code used to initialize it:
>
> That doesn't work - the libev API requires file descriptors on all
> platforms.  What you pass in is a native opertaing system handle that is
> not a file descriptor.
>



More information about the libev mailing list