[Libevent-users] Re: IOCP writes

Rhythmic Fistman rfistman at gmail.com
Wed Feb 21 17:00:15 EST 2007


> From: "Toby Douglass" <toby.douglass at summerblue.net>

> > I'm adding support for IOCP writes.
> >
> > I've realised, though, that if you issue a write on a socket which
> > currently has an outstanding reading, when the IOCP completes, you don't
> > immediately know which operation has completed.
>
> Obviously I used the completion key.
>
> I didn't see it immediately because I'm already using that for something
> else, bah, hambug.

I don't think you should be passing the same overlapped structure
twice to WSARecv/Send. I'm pretty sure that the overlapped isn't
"yours" until GetQueuedCompletionStatus says so. Try a unique
overlapped structure for each overlappable call.

-- 
felix: lightweight threads, HOFs and game scripting.
svn co https://svn.sourceforge.net/svnroot/felix/felix/trunk felix


More information about the Libevent-users mailing list