leitner
7bdc1b29bb
a few missing headers and minor fixes
...
fix corking behavior for the case where a buffer follows a buffer in
iob_send
2015-09-06 18:01:02 +00:00
leitner
fce165fdcb
remove dead store
2015-04-10 23:15:59 +00:00
leitner
c60c2425ce
hopefully fix the infinite loop in gatling
2014-10-19 01:52:36 +00:00
leitner
193dfba16b
remove compiler warning
2014-10-16 16:17:09 +00:00
leitner
4fa4a524d2
add io_fd_flags so the caller can tell io_fd whether the socket is blocking
...
(saves one fcntl syscall)
2014-10-09 09:02:28 +00:00
leitner
953eb639b2
on Linux, save a few syscalls by using sendto/sendmsg with MSG_MORE
...
instead of write/writev + setsockopt TCP_CORK
2014-10-07 13:43:50 +00:00
leitner
4404ab35f3
revert to level triggering for epoll (forgot io_wantread)
2014-09-09 13:48:04 +00:00
leitner
967e3ce019
revert edge triggering epoll; it had reliability and fairness issues and
...
was also not actually faster
2014-08-28 19:03:57 +00:00
leitner
39e7ee90bb
introduce io_eagain_read and io_eagain_write (discontinue using io_eagain plz)
2014-06-05 20:43:01 +00:00
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
2014-06-05 19:17:24 +00:00
leitner
5baf943f0a
finish epoll move to edge triggering
2014-05-08 04:25:42 +00:00
leitner
a544abc39c
switch io_fds from array to newly implemented (hopefully thread-safe) iarray
...
switch epoll from level triggering to edge triggering
2014-04-04 18:11:03 +00:00
leitner
ff3a3410ec
hopefully this fixes the looping gatling processes
2013-10-01 23:15:51 +00:00
leitner
e175800a8c
add io_fd_canwrite (like io_fd but assume the fd is writable)
...
save a few syscalls here and there
2012-04-10 21:15:51 +00:00
leitner
6e6fc8b85d
fix endless loop bug on freebsd
2012-03-19 02:38:52 +00:00
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
2012-02-24 02:00:52 +00:00
leitner
662cf55fc9
accept -3 as error return from the callback, too
2012-01-20 19:19:49 +00:00
leitner
b0886bc324
the iob calls return int, not void
2012-01-13 02:25:31 +00:00
leitner
d2aae4864c
only try to receive one byte to avoid discarding data
2010-10-06 17:33:25 +00:00
leitner
3bed09a972
get rid of warning
2010-01-19 02:44:06 +00:00
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)
2010-01-18 19:51:00 +00:00
leitner
1fcfcd268a
hups
2009-05-24 18:12:14 +00:00
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.
2009-04-25 19:09:27 +00:00
leitner
fd47173110
remove four warnings
2008-12-08 22:55:02 +00:00
leitner
a8a5e9a3d5
some valgrind de-noising
...
fix subtle typo in sub_of (David Sirovsky)
2008-02-27 12:10:05 +00:00
leitner
68d88f60b9
munmap cleanup fix (Erdgeist)
2007-10-19 10:59:47 +00:00
leitner
8b17690318
use callback based infrastructure to reset iob's
2007-10-17 13:25:44 +00:00
leitner
527efc70b6
add iob_addbuf_munmap
2007-10-17 13:06:56 +00:00
leitner
1b88982d19
off-by-one
2007-01-26 14:16:14 +00:00
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)
2007-01-24 18:28:39 +00:00
leitner
8eab2b5aaf
make io_timeout clearer
2007-01-10 14:14:30 +00:00
leitner
f046d1cdc1
add iob_bytesleft
...
don't leak memory in test/httpd.c
2006-12-19 13:19:32 +00:00
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)
2006-06-23 03:53:16 +00:00
leitner
d361d81c64
make socket_(tc|ud)p[46] actually return non-blocking sockets as
...
documented (Richard Lyons)
2006-05-18 06:02:43 +00:00
leitner
d468ea9eb7
add io_block
2006-04-17 05:07:43 +00:00
leitner
c16d9880dc
remove printf
2005-10-12 15:21:27 +00:00
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.
2005-09-09 22:12:23 +00:00
leitner
f65398ff2e
io_close resets the cookie
2005-09-02 21:52:22 +00:00
leitner
9512cee614
add -D_REENTRANT to CFLAGS so libowfat can be used in multi-threaded
...
programs
2005-09-02 21:11:58 +00:00
leitner
b1e8f341ba
no debug
2005-08-24 17:32:20 +00:00
leitner
12caccfd48
don't shrink in array_allocate
2005-08-24 17:30:40 +00:00
leitner
e1e80badf0
add some debug stuff
2005-08-24 17:13:35 +00:00
leitner
46dcfbdce1
Uh, it's #warning and not #warn. *blush*
2005-07-01 19:32:04 +00:00
leitner
289ca04238
Work around OpenBSD. Again.
2005-07-01 19:30:01 +00:00
leitner
f0e9a2afc9
work around broken Solaris sys/socket.h
2005-05-20 14:42:42 +00:00
leitner
c169ae9b4a
IRIX compatibility (yuck!)
2005-05-20 14:14:15 +00:00
leitner
9405f1271b
remove gcc4-only warning option
2005-05-03 12:14:29 +00:00
leitner
c874604f12
gcc 4 cleanups (mostly unsigned char* vs char*)
2005-04-23 15:50:16 +00:00
leitner
7cd919d333
silence two gcc warnings
2005-04-01 21:07:10 +00:00
leitner
11da04b651
fix descriptor leak in iob_addfile_close if the range was 0 (oops)
2005-03-11 18:34:34 +00:00