[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] Using event_active() for partial reading with bufferevents
- To: libevent-users@xxxxxxxx
- Subject: [Libevent-users] Using event_active() for partial reading with bufferevents
- From: Himanshu S <mail2himanshu@xxxxxxxxx>
- Date: Mon, 5 Nov 2012 21:29:39 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Tue, 06 Nov 2012 00:29:42 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=O9RpUdDIUm6aTUOdImvMkw21yMWGqFMjzo/cmdx3294=; b=VGHLZm2yefSoei4hocaUbZiyuDDo3PAkRP6n1gjW41fxEgoD7dPIUv086S7MkfF6Vy rLShP9qG+BJ9EHYZJOsRHrY+vCRL/nN/LxtT3CY9/1p/hoBdYgrq+eJ1FbL1HoH4onb/ XK4Dmal7u/+v8hYh+KlLVB0WqIYGI7mjNYEVx/T4zgFKUL67G+heDVpzfGFmieU6uv9C zJ/22xtUpqMrkLbf2C5hfWG4mC8EtBlVsEtMef2Qw+fgWroasU8MigYnu7PrEJH0ez3m 38JhTbwSp+00yh5/VE9UcH1WaqKvYkhNDD6JwqpvnhlnhRTzDMDoaJ1PbUbNZGsZoHCZ RM4Q==
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
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