[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Using event_active() for partial reading with bufferevents



Hi,
   I am using bufferevent_* APIs for my application to read/write data to TCP stream. When the data arrives, the read callback happens, I want to read partial data (at times), and then be able to post an event back so that the event is queued up and read callback is called again. I thought event_active() gives this functionality but apparently its not. I am using event_active with following parameters,

event_active(&bev->ev_read, EV_READ, 1);

bev is bufferevent pointer.

Am I missing anything? I am using bufferevent in single threaded environment, so same thread is doing event_active.

Regards,
-Himanshu