views:

28

answers:

1

Hello, I've been trying to get the lpfnAcceptEX function in Win32 to block on accept. If this is not possible I was wondering if there was a flag I could accpet or some other function that I could wait on. Right now the program is simply continually creating accepted sockets with no connections behind them.

Perhaps I am misunderstanding how this is to work. Is there another function I need to wait on?

I am following the example laid out here: http://msdn.microsoft.com/en-us/library/ms737524(VS.85).aspx

Thanks, = Alikar

+1  A: 

Assuming you passed in a valid OVERLAPPED structure and aren't using I/O completion ports, just call WaitForSingleObject(overlapped.hEvent, TRUE) to block on AcceptEx.

MSN
Excellent I'll have to try that when I get back home.
Alikar