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

2012-09-02 Thread Oleg
oach is right. 02.09.2012, в 6:54, Parvez Shaikh написал(а): > 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

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

2012-08-31 Thread Oleg
EV_WRITE calls whenever you can write to send buffer until it's not full. So if you have never called send(), but EV_WRITE is enabled you will receive this event each new loop (your CPU will be ~100% used). If you have called send() and it didn't return EAGAIN you will also receive this event ne

[Libevent-users] Putting event on the top of the queue

2011-04-26 Thread Gordiychuck Oleg
Hello! I'm using event2 libs and i want to know if it is possible to put new event on the top of the queue. For example, i have next events queue: ev1 -> ev2 -> ev3 While processing ev1 an error occured. Now i want to create new event(err_ev) that will close all application's modules and i

Re: [Libevent-users] Read callback problem

2011-02-07 Thread Gordiychuck Oleg
Thank you, exactly what i need ! :) *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Read callback problem

2011-02-07 Thread Gordiychuck Oleg
Hello! My send function is next: static void WriteNeighbor(Neighbor *neighbor, unsigned int size, uint8_t *data) { uint8_t pre_data[4]; Utils::put_be32(pre_data, command); if (bufferevent_write(neighbor->bev,pre_data,4)==-1) ErrorFactory::Die(Errors::Write

[Libevent-users] Read callback problem

2011-02-06 Thread Gordiychuck Oleg
Начало переадресованного сообщения: > От: Gordiychuck Oleg > Дата: 7 лютого 2011 р. 00:04:43 GMT+02:00 > Кому: majord...@freehaven.net > Тема: Read callback problem > > Hello! > > I have a simple network application with simple protocol over TCP\IP. The > ma