From 86db1c851be804b13aadebcc0b1a21a4493192dd Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 4 Nov 2009 05:19:26 +0000 Subject: Commit ConnectEx code to get connect working with async bufferevents. This is code by Chris Davis, with changes to get the unit tests failing less aggressively. The unit tests for this code do not completely pass yet; Chris is looking into that. If they aren't passing by the next release, I'll turn off this code. svn:r1499 --- bufferevent-internal.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bufferevent-internal.h') diff --git a/bufferevent-internal.h b/bufferevent-internal.h index eec60e1a..4ee6d908 100644 --- a/bufferevent-internal.h +++ b/bufferevent-internal.h @@ -141,6 +141,17 @@ extern const struct bufferevent_ops bufferevent_ops_socket; extern const struct bufferevent_ops bufferevent_ops_filter; extern const struct bufferevent_ops bufferevent_ops_pair; +#define BEV_IS_SOCKET(bevp) ((bevp)->be_ops == &bufferevent_ops_socket) +#define BEV_IS_FILTER(bevp) ((bevp)->be_ops == &bufferevent_ops_filter) +#define BEV_IS_PAIR(bevp) ((bevp)->be_ops == &bufferevent_ops_pair) + +#ifdef WIN32 +extern const struct bufferevent_ops bufferevent_ops_async; +#define BEV_IS_ASYNC(bevp) ((bevp)->be_ops == &bufferevent_ops_async) +#else +#define BEV_IS_ASYNC(bevp) 0 +#endif + /** Initialize the shared parts of a bufferevent. */ int bufferevent_init_common(struct bufferevent_private *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options); -- cgit v1.2.1