Question : Winsock select() vs WaitForMultipleObjects()

I am porting an applicaiton from Unix to NT and don't want to change the select() loop design.  I also have some NT kernel owned handles that may become signaled while I am blocked on the select() call.

How do I mix these two paradigms?  Can I get signaled handles out of the Winsock SOCKET structures or can I build a SOCKET structure from a NT Handle to give to the select() call?

Answer : Winsock select() vs WaitForMultipleObjects()

You could create a background thread to do the select and signal an event object when the select call returns. That way, the main thread would only use WaitForMultipleObjects.


Random Solutions  
 
programming4us programming4us