Libevent Code Doxygen document
Public Attributes | List of all members
bufferevent_ops Struct Reference

#include <bufferevent-internal.h>

Public Attributes

const char * type
 
off_t mem_offset
 
int(* enable )(struct bufferevent *, short)
 
int(* disable )(struct bufferevent *, short)
 
void(* unlink )(struct bufferevent *)
 
void(* destruct )(struct bufferevent *)
 
int(* adj_timeouts )(struct bufferevent *)
 
int(* flush )(struct bufferevent *, short, enum bufferevent_flush_mode)
 
int(* ctrl )(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *)
 

Detailed Description

Implementation table for a bufferevent: holds function pointers and other information to make the various bufferevent types work.

Member Data Documentation

◆ adj_timeouts

int(* bufferevent_ops::adj_timeouts) (struct bufferevent *)

Called when the timeouts on the bufferevent have changed.

◆ ctrl

int(* bufferevent_ops::ctrl) (struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *)

Called to access miscellaneous fields.

◆ destruct

void(* bufferevent_ops::destruct) (struct bufferevent *)

Free any storage and deallocate any extra data or structures used in this implementation. Called when the bufferevent is finalized.

◆ disable

int(* bufferevent_ops::disable) (struct bufferevent *, short)

Disables one or more of EV_READ|EV_WRITE on a bufferevent. Does not need to adjust the 'enabled' field. Returns 0 on success, -1 on failure.

◆ enable

int(* bufferevent_ops::enable) (struct bufferevent *, short)

Enables one or more of EV_READ|EV_WRITE on a bufferevent. Does not need to adjust the 'enabled' field. Returns 0 on success, -1 on failure.

◆ flush

int(* bufferevent_ops::flush) (struct bufferevent *, short, enum bufferevent_flush_mode)

Called to flush data.

◆ mem_offset

off_t bufferevent_ops::mem_offset

At what offset into the implementation type will we find a bufferevent structure?

Example: if the type is implemented as struct bufferevent_x { int extra_data; struct bufferevent bev; } then mem_offset should be offsetof(struct bufferevent_x, bev)

◆ type

const char* bufferevent_ops::type

The name of the bufferevent's type.

◆ unlink

void(* bufferevent_ops::unlink) (struct bufferevent *)

Detatches the bufferevent from related data structures. Called as soon as its reference count reaches 0.


The documentation for this struct was generated from the following file: