> On 2/27/07, Toby Douglass <[EMAIL PROTECTED]> wrote: >> Not really a bug as such - a documentation bug, if you like. >> >> If you call AcceptEx() and specify a non-zero read buffer size, >> GetQueuedCompletionStatus() will NOT return on a connect. It will only >> return when some data is sent.
> *dwReceiveDataLength* [in] Number of bytes in *lpOutputBuffer* that will > be > used for actual receive data at the beginning of the buffer. This size > should not include the size of the local address of the server, nor the > remote address of the client; they are appended to the output buffer. If * > dwReceiveDataLength* is zero, accepting the connection will not result in > a > receive operation. Instead, *AcceptEx* completes as soon as a connection > arrives, without waiting for any data. That's the section I was thinking of when I described the behaviour as undocumented. The behaviour in question is this: if you set the buffer size in AcceptEx() to a value larger than 0, GetQueuedCompletionStatus() will not return a completed I/O packet on the accept operation until a read operation completes. What the docs say is this: "If dwReceiveDataLength is zero, accepting the connection will not result in a receive operation. Instead, *AcceptEx* completes as soon as a connection arrives, without waiting for any data." Which is to say: if you specify a zero length buffer, you won't get a receive operation with your accept completion; instead, you'll only get an accept. This is insufficient, because it says nothing about the behaviour in the case of an accept where no data is being sent. Do you get an accept completion or not? all you know is that if you set the buffer to 0, you would get an accept completion. _______________________________________________ Libevent-users mailing list [email protected] http://monkey.org/mailman/listinfo/libevent-users
