mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Tweaks to IOCP interface.
svn:r1461
This commit is contained in:
parent
7b10724901
commit
38aec9ec7c
@ -270,7 +270,7 @@ bufferevent_socket_new(struct event_base *base, evutil_socket_t fd,
|
|||||||
struct bufferevent *bufev;
|
struct bufferevent *bufev;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if (base && base->iocp)
|
if (base && event_base_get_iocp(base))
|
||||||
return bufferevent_async_new(base, fd, options);
|
return bufferevent_async_new(base, fd, options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
2
event.c
2
event.c
@ -342,7 +342,7 @@ event_base_new_with_config(struct event_config *cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#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);
|
event_base_start_iocp(base);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -195,11 +195,6 @@ end:
|
|||||||
evbuffer_free(wbuf);
|
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
|
static void
|
||||||
test_iocp_bufferevent_async(void *ptr)
|
test_iocp_bufferevent_async(void *ptr)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user