return bufev->ev_base;
}
+int
+bufferevent_get_priority(struct bufferevent *bufev)
+{
+ if (event_initialized(&bufev->ev_read)) {
+ return event_get_priority(&bufev->ev_read);
+ } else {
+ return event_base_get_npriorities(bufev->ev_base) / 2;
+ }
+}
+
int
bufferevent_write(struct bufferevent *bufev, const void *data, size_t size)
{
*/
int bufferevent_priority_set(struct bufferevent *bufev, int pri);
+/**
+ Return the priority of a bufferevent.
+
+ Only supported for socket bufferevents
+ */
+int bufferevent_get_priority(struct bufferevent *bufev);
/**
Deallocate the storage associated with a bufferevent structure.