tis 2006-10-24 klockan 08:24 +0200 skrev Guido Serassio: > Sure, but some oddity comes directly from Microsoft "features" .... :-) > Windows select() is only similar to the Unix one ....
Sorted out the differences and whipped up a new comm_select_win32.c file (untested). Please check if it works. It approaches the HANDLE -> fd lookup more in line with normal FD_ISSET which should be slightly faster as less data to loop over. Also whipped up a comm_poll_win32.c file which in theory should work on Vista/Longhorn and perform significantly better thanks to it's static mappings allowing efficient HANDLE -> fd lookups. Would be good if you could test the new comm_select_win32.c. And if interested play with comm_poll_win32.c (but due to the OS dependencies it's a bit early to deploy such builds I suppose..) May also be interesting to look into using WSAAsyncSelect(), the win32 equivalence to kqueue/epoll with some edge/level twists. It's interface looks like a quite good fit for our event loop, and allows for a trivial HANDLE->fd mapping (just use the fd number as event message). But then got a little lost as I am not familiar with how to handle Windows event loops in non-windowed appliecations.. i.e. what window handle should be given to WSAAsyncSelect? And where is the resulting window messages received? Regards Henrik
signature.asc
Description: Detta är en digitalt signerad meddelandedel
