开发者

Getting lpfnAcceptEx (accpetex) to block in native C++

开发者 https://www.devze.com 2022-12-25 23:20 出处:网络
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.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消