[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] bufferevent_priority_set() for read/write
On Wed, Mar 09, 2016 at 04:07:18PM -0800, Himanshu S wrote:
> Hello experts,
Hi, Himanshu
Sorry for such a long reply, but
> I see there is priority set available for bufferevent
> using bufferevent_priority_set(). I believe this will set priority for read
> as well as write events.
Indeed.
> What I would like to do is prioritize one over
> another. How do I achieve that? For eg, I would like to prioritize write
> over reads or the other way round. Is it possible to do that?
You can do something like this:
/** but this is @deprecated */
#include <event2/bufferevent_struct.h>
event_priority_set(&bufev->ev_read, prio.r);
event_priority_set(&bufev->ev_write, prio.w);
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.