17 Commits

Author SHA1 Message Date
Jardel Weyrich
510ab6bce0 Comestic changes in evconnlistener_new(), new_accepting_socket(), accepted_socket_invoke_user_cb() and iocp_listener_enable(). 2010-01-08 23:28:54 -05:00
Jardel Weyrich
fec66f9685 Improved error handling in evconnlistener_new_async(). Also keeping the fd open because it is not opened by this function, so the caller is responsible for closing it. Additionally, since evconnlistener_new_bind() creates a socket and passes it to the function above, it required error checking to close the same socket. 2010-01-08 23:28:23 -05:00
Jardel Weyrich
4367a33a20 Fixed a fd leak in start_accepting(), plus cosmetic changes 2010-01-08 23:27:26 -05:00
Jardel Weyrich
d0939d2b97 Introduced evutil_make_socket_closeonexec() to preserve fd flags for F_SETFD.
Use this to eliminate the various macros that called F_SETFD throughout
the code.
2009-12-29 15:12:56 -05:00
Jardel Weyrich
24fb502f70 Fix an fd leak in evconnlistener_new_bind(). 2009-12-28 16:01:12 -05:00
Nick Mathewson
784b8773a4 We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
svn:r1516
2009-11-06 21:46:57 +00:00
Nick Mathewson
0aa6f5136a Fix remaining AcceptEx issues.
svn:r1492
2009-11-02 20:59:13 +00:00
Nick Mathewson
e794d716a3 Clean up acceptex code some more: add locking, single-threading, enable/disable.
svn:r1491
2009-11-02 20:20:40 +00:00
Nick Mathewson
a84c87d76a Refactor IOCP callback interface
Chris Davis points out that GetQueuedCompletionStatus
sometimes returns false not to report "No events for
you!" but instead to report "An overlapped operation
failed."  Add a way to tell an event_overlapped that
its operation failed.

svn:r1490
2009-11-02 19:51:26 +00:00
Nick Mathewson
9a772148f2 Compilation and correctness fixes for IOCP listener code.
svn:r1489
2009-11-02 19:31:29 +00:00
Nick Mathewson
5d2c1650f3 More refactoring for IOCP listener code
svn:r1486
2009-11-02 17:42:09 +00:00
Nick Mathewson
20f5bdfd6b Refactor evconnlistener to allow multiple implementations; add an (incomplete, not-yet-integrated) IOCP implementation.
svn:r1480
2009-10-29 19:25:33 +00:00
Nick Mathewson
75fe762e03 Accessor function to get a listener's associated fd
svn:r1390
2009-07-30 17:00:56 +00:00
Nick Mathewson
1ee65b7f94 Do not assume we know the value for FD_CLOEXEC.
svn:r1301
2009-05-21 20:59:17 +00:00
Nick Mathewson
7e3ea82ee6 Disallow backlog==0 in evconnlistener_new_bind().
svn:r1300
2009-05-21 20:59:09 +00:00
Nick Mathewson
ed1bbc7a9f Tweak the evconnlistener interface a little.
svn:r1295
2009-05-18 16:15:56 +00:00
Nick Mathewson
659d54d530 Add new code to make and accept connections.
This is stuff that it's easy to get wrong (as I noticed when writing
bench_http), and that takes up a fair amount of space (see http.c).
Also, it's something that we'll eventually want to abstract to use
IOCP, where available.

svn:r1272
2009-05-05 02:59:26 +00:00