asynchronous socket writing

James Mansion james at mansionfamily.plus.com
Fri Mar 12 21:32:41 CET 2010


Jonas H. wrote:
> On 03/12/2010 03:50 PM, Marc Lehmann wrote:
>> No, it uses events and non-blocking I/O, was other people have 
>> pointed out.
>
> I am very sorry but I still don't get it.
>
>   How on earth can I get the 'you-can-now-write' event for another 
> client/request/whatever while writing to another client the same time?
>   Is this something libev handles for you? Splitting up big writes 
> into smaller ones, giving other clients a chance to be written to 
> after each part?
>
>     Jonas
I think you're going to need to get Steven's Network Programming and 
have a good read.

Why, out of interest, do you want to do this in C?  If you're happy 
enough with threads etc
you might be better off with Poco and C++, or possibly ACE (which has 
some books etc,
but is a bit long in the tooth compared to Poco).  Or just give in, go 
over to the Dark Side,
and download Netty.

James




More information about the libev mailing list