o expose bufferevent_setwatermark via header files and fix high watermark on read
o fix a bug in buffrevent read water marks and add a test for them
o fix a bug in which bufferevent_write_buffer would not schedule a write event
-
+ o provide bufferevent_input and bufferevent_output without requiring knowledge of the structure
+
Changes in 1.4.0:
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
o demote most http warnings to debug messages
return (bufev);
}
+struct evbuffer *
+bufferevent_input(struct bufferevent *bufev)
+{
+ return (bufev->input);
+}
+
+struct evbuffer *
+bufferevent_output(struct bufferevent *bufev)
+{
+ return (bufev->output);
+}
+
int
bufferevent_priority_set(struct bufferevent *bufev, int priority)
{
*/
int bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf);
+/**
+ Returns the input buffer.
+
+ @param bufev the buffervent from which to get the evbuffer
+ @return the evbuffer object for the input buffer
+ */
+
+struct evbuffer *bufferevent_input(struct bufferevent *bufev);
+
+/**
+ Returns the outut buffer.
+
+ @param bufev the buffervent from which to get the evbuffer
+ @return the evbuffer object for the output buffer
+ */
+
+struct evbuffer *bufferevent_output(struct bufferevent *bufev);
+
/**
Enable a bufferevent.
void bufferevent_setwatermark(struct bufferevent *bufev, short events,
size_t lowmark, size_t highmark);
-#define EVBUFFER_INPUT(x) (x)->input
-#define EVBUFFER_OUTPUT(x) (x)->output
+#define EVBUFFER_INPUT(x) bufferevent_input(x)
+#define EVBUFFER_OUTPUT(x) bufferevent_output(x)
#ifdef __cplusplus