summaryrefslogtreecommitdiff
path: root/bufferevent-internal.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-04-10 15:01:31 +0000
committerNick Mathewson <nickm@torproject.org>2009-04-10 15:01:31 +0000
commit23085c92477035507c499530d4a200bceee5d8a1 (patch)
treec24947a8b1af1cf0c7b1beacc158f6f1a276a3f4 /bufferevent-internal.h
parent8161662007e4ffe8c71e3f8267733b2131d8d619 (diff)
downloadlibevent-23085c92477035507c499530d4a200bceee5d8a1.tar.gz
Add a linked-pair abstraction to bufferevents.
The new bufferevent_pair abstraction works like a set of buferevent_sockets connected by a socketpair, except that it doesn't require a socketpair, and therefore doesn't need to get the kernel involved. It's also a good way to make sure that deferred callbacks work. It's a good use case for deferred callbacks: before I implemented them, the recursive relationship between the evbuffer callback and the read callback would make the unit tests overflow the stack. svn:r1152
Diffstat (limited to 'bufferevent-internal.h')
-rw-r--r--bufferevent-internal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bufferevent-internal.h b/bufferevent-internal.h
index a08dfe86..1d4b80d1 100644
--- a/bufferevent-internal.h
+++ b/bufferevent-internal.h
@@ -76,8 +76,9 @@ struct bufferevent_ops {
int (*flush)(struct bufferevent *, short, enum bufferevent_flush_mode);
};
-extern const struct bufferevent_ops be_ops_socket;
-extern const struct bufferevent_ops be_ops_filter;
+extern const struct bufferevent_ops bufferevent_ops_socket;
+extern const struct bufferevent_ops bufferevent_ops_filter;
+extern const struct bufferevent_ops bufferevent_ops_pair;
/** Initialize the shared parts of a bufferevent. */
int bufferevent_init_common(struct bufferevent *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options);