[Libevent-users] Re: IOCP writes
Toby Douglass
toby.douglass at summerblue.net
Thu Feb 22 15:26:22 EST 2007
William Ahern wrote:
> On Thu, Feb 22, 2007 at 01:43:48PM -0000, Toby Douglass wrote:
>> However, the example I had in mind (which is similar) is P2P apps, which
>> use writes on a single local UDP socket to send peering information to
>> peers. They would benefit from async writes on that socket.
>
> Writing to a UDP socket should never block, period. If the output buffer is
> full, and you write another message, it should force the stack to drop a
> message.
Good point. I'd forgotten about that.
> But, that could just as well have happened on the wire, so what's
> the difference?
It would be more reliable not to fail locally if you could avoid it.
The fact it *could* happen on the wire doesn't give us license to drop
things when we could have avoided it.
> Likely what the NIC can push out and what the link can
> handle is different, so trying to cater to the output buffer is a futile
> excercise, as far as I can see.
So, the final implication is that users will ONLY ever perform serial
writes on a socket, no matter what it is?
More information about the Libevent-users
mailing list