]> granicus.if.org Git - libevent/commit
Some IOCP bufferevent tweaks.
authorChristopher Davis <chrisd@torproject.org>
Tue, 17 Aug 2010 12:02:00 +0000 (05:02 -0700)
committerChristopher Davis <chrisd@torproject.org>
Wed, 8 Sep 2010 08:22:22 +0000 (01:22 -0700)
commit76f7e7ae745ad730795f0a4a3bc1299a00137cc2
tree5327da1a718cc561e989fee28af0bbafc2e2ee92
parentd844242f9b138be4896942ded25d74a91bf29901
Some IOCP bufferevent tweaks.

- Increment reference count of bufferevents before initiating overlapped
  operations to prevent the destructor from being called while operations
  are pending. The only portable way of canceling overlapped ops is to
  close the socket.

- Translate error codes to WSA* codes.

- Better handling of errors.

- Add an interface to add and del "virtual" events. Because IOCP
  bufferevents don't register any events with the base, the event loop
  has no way of knowing they exist. This causes the loop to terminate
  prematurely. event_base_{add,del}_virtual increment/decrement base's
  event count so the loop runs while there are any enabled IOCP
  bufferevents.
bufferevent_async.c
event-internal.h
event.c
event_iocp.c