Hi, Richter

Thanks for your tips ! The way you mention works well.

The full package:
http://spserver.googlecode.com/files/libevent-main-iocp-1.zip   

Changes:
1.Remove EV_ACCEPT flag, use getsockopt(SO_ACCEPTCONN) to distinguish 
accept/read,
  so it's compatible with the old code now.
2.Using red-black tree to map sockets to events, it use a array previously.
3.Replace WSARecv and WSASend by ReadFile and WriteFile, so it can process 
FileHandle.
  The event_test.c is working now ( but need some changes ).
4.Support nonpersist accept event, it always treat accept event is persist 
previously.

Any and all comments are appreciated. 


Best regards,

Stephen Liu
2008-06-16

>>>
>Hi Stephen Liu,
>
>> The changes are:
>> 2.Add EV_ACCEPT flag for accept event ( in include\event.h )
>>  #define EV_ACCEPT   0x40
>
>I like your work that you have put into this. Keep on the good work!
>But what I don't like is the new EV_ACCEPT flag.
>
>Have you thought about detecting somehow if a socket is a listen socket? I 
>just browsed msdn to find a way. Looks like getsockopt(SO_ACCEPTCONN) can be 
>used for this task. Sorry, but can't test it right now. 
>
>If your are able to use iocp without a change in the interface everyone will 
>benefit without changing their code. This would be a huge win.
>
>
>   J�rg
                        

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to