Commit Graph

172 Commits (a0cde0fee94840c2507172154811cb02e2ab8d23)

Author SHA1 Message Date
leitner 7bdc1b29bb a few missing headers and minor fixes
fix corking behavior for the case where a buffer follows a buffer in
iob_send
leitner fce165fdcb remove dead store
leitner c60c2425ce hopefully fix the infinite loop in gatling
leitner 193dfba16b remove compiler warning
leitner 4fa4a524d2 add io_fd_flags so the caller can tell io_fd whether the socket is blocking
(saves one fcntl syscall)
leitner 953eb639b2 on Linux, save a few syscalls by using sendto/sendmsg with MSG_MORE
instead of write/writev + setsockopt TCP_CORK
leitner 4404ab35f3 revert to level triggering for epoll (forgot io_wantread)
leitner 967e3ce019 revert edge triggering epoll; it had reliability and fairness issues and
was also not actually faster
leitner 39e7ee90bb introduce io_eagain_read and io_eagain_write (discontinue using io_eagain plz)
leitner d9cbb3940c it turns out you don't need -1/EGAIN to know edge triggering told you
there is no more data, it's enough to read/write less than you asked for
leitner 5baf943f0a finish epoll move to edge triggering
leitner a544abc39c switch io_fds from array to newly implemented (hopefully thread-safe) iarray
switch epoll from level triggering to edge triggering
leitner ff3a3410ec hopefully this fixes the looping gatling processes
leitner e175800a8c add io_fd_canwrite (like io_fd but assume the fd is writable)
save a few syscalls here and there
leitner 6e6fc8b85d fix endless loop bug on freebsd
leitner c2a2a15c12 document the return value expected from the callback given to iob_write
remove unused #include in iob_reset
if iob_addfile_close fails, it now closes the fd
if iob_addbuf_munmap fails, it now munmaps the buf
if iob_addbuf_free fails, it now frees the buf
some win32 cross-compile fixes for iarray
leitner 662cf55fc9 accept -3 as error return from the callback, too
leitner b0886bc324 the iob calls return int, not void
leitner d2aae4864c only try to receive one byte to avoid discarding data
leitner 3bed09a972 get rid of warning
leitner acd4fdb68b add/fix man pages
zero a buffer in io_passfd so valgrind does not complain when we pass it
to a syscall (which did not use the uninitialized parts anyway)
leitner 1fcfcd268a hups
leitner 51202765fe the #define extern hack in io_fd.c also included time.h, fix that
catch case in timeout loop where we have something to report on an fd;
in that case do not report a timeout but let the other event get through
first.
leitner fd47173110 remove four warnings
leitner a8a5e9a3d5 some valgrind de-noising
fix subtle typo in sub_of (David Sirovsky)
leitner 68d88f60b9 munmap cleanup fix (Erdgeist)
leitner 8b17690318 use callback based infrastructure to reset iob's
leitner 527efc70b6 add iob_addbuf_munmap
leitner 1b88982d19 off-by-one
leitner 7b52bfc982 fix really pathological case where io_timeouted would never
start over from the beginning because always new accept()ed
    connections came in and got newer, higher descriptors since the last
    io_timeouted loop.  (Dirk Engling)
leitner 8eab2b5aaf make io_timeout clearer
leitner f046d1cdc1 add iob_bytesleft
don't leak memory in test/httpd.c
leitner 83c1186870 fix for NetBSD 3.0 (they broke their sys/types.h)
remove support for ip6.int reverse lookup in DNS routines (the domain is
no longer delegated)
leitner d361d81c64 make socket_(tc|ud)p[46] actually return non-blocking sockets as
documented (Richard Lyons)
leitner d468ea9eb7 add io_block
leitner c16d9880dc remove printf
leitner c1c50c7dbd further Windoze support (test/io5.c works, gatling still doesn't)
This is just to get gatling to work, I may remove it again after
    that.
leitner f65398ff2e io_close resets the cookie
leitner 9512cee614 add -D_REENTRANT to CFLAGS so libowfat can be used in multi-threaded
programs
leitner b1e8f341ba no debug
leitner 12caccfd48 don't shrink in array_allocate
leitner e1e80badf0 add some debug stuff
leitner 46dcfbdce1 Uh, it's #warning and not #warn. *blush*
leitner 289ca04238 Work around OpenBSD. Again.
leitner f0e9a2afc9 work around broken Solaris sys/socket.h
leitner c169ae9b4a IRIX compatibility (yuck!)
leitner 9405f1271b remove gcc4-only warning option
leitner c874604f12 gcc 4 cleanups (mostly unsigned char* vs char*)
leitner 7cd919d333 silence two gcc warnings
leitner 11da04b651 fix descriptor leak in iob_addfile_close if the range was 0 (oops)