Dear Libev users/developers,

Long story short: we are developing a gaming application (client/server model) 
and using libev in the project. Source includes libev on Linux OS 
compile/build/run works fine, however more of our developers working on Windows 
OS development environment because client is Visual C++ and would like to (have 
to) run server in local Win OS environment for development purposes. Before 
we've added libev to the source server worked fine in windows environment. 
Windows code compiled with MSVC 9.0 compiler. We have problems with Windows fh 
(fd).

============================================================================================
Issue details:
Platform/Os:  WinXp/Win7 32 bit
Dev: Visual Studio 2008 C++ (sp1)
Libev: 4.04 & 4.09

Problem: EV_FD_TO_WIN32_HANDLE can't convert fd to win32 handle (debug assert 
failed msg using EV_FD_TO_WIN32_HANDLE )

code: SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd);  <<----- makes debug assert 
failed msg! Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle)

this line makes an assert :
_VALIDATE_CLEAR_OSSERR_RETURN((fh >= 0 && (unsigned)fh < (unsigned)_nhandle), 
EBADF, -1);


WHERE:
n_handle is always 32 
fh's (fd) value is reasonably high: 500++ or even over 5000
fh is much higher than _nhandle (the main problem)

fd is a simple winsock 2.0 socket created like this:
SOCKET fd = socket( AF_INET, SOCK_STREAM, 0 );
later binded but not closed!


Why is the fd greater than 32? 
Bug in "SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd)" ?

=========================================================================

Hope some of You able to help,
Best Regards,
Gabor
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to