Tweaks to IOCP interface.

svn:r1461
This commit is contained in:
Nick Mathewson 2009-10-23 22:38:35 +00:00
parent 7b10724901
commit 38aec9ec7c
3 changed files with 2 additions and 7 deletions

View File

@ -270,7 +270,7 @@ bufferevent_socket_new(struct event_base *base, evutil_socket_t fd,
struct bufferevent *bufev;
#ifdef WIN32
if (base && base->iocp)
if (base && event_base_get_iocp(base))
return bufferevent_async_new(base, fd, options);
#endif

View File

@ -342,7 +342,7 @@ event_base_new_with_config(struct event_config *cfg)
}
#ifdef WIN32
if ((cfg->flags & EVENT_BASE_FLAG_STARTUP_IOCP) != 0)
if (cfg && (cfg->flags & EVENT_BASE_FLAG_STARTUP_IOCP))
event_base_start_iocp(base);
#endif

View File

@ -195,11 +195,6 @@ end:
evbuffer_free(wbuf);
}
/*FIXME get this from a header once it's in one. */
struct bufferevent *
bufferevent_async_new(struct event_base *base,
evutil_socket_t fd, enum bufferevent_options options);
static void
test_iocp_bufferevent_async(void *ptr)
{