Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-09-02 Thread Nir Soffer
On Sun, Sep 2, 2012 at 6:54 AM, Parvez Shaikh wrote: > Thanks Oleg, > > Second approach is what I am doing. > > Why disabled EV_WRITE in write callback? > > I'd wish to have this callback called again whenever send buffer has > space, so disabling EV_WRITE will prevent this. You want to enable E

Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-09-02 Thread Oleg
If you need such approach then do not disable it. But remember that if you have no data in queue your callback anyway will be called immediately after wait() function.This consumes your CPU. But if you're sure that queue size is always > TCP send buffer size then you're approach is right. 02.0