nginx-quic/auto
Maxim Dounin 7b87731ce3 Events: available bytes calculation via ioctl(FIONREAD).
This makes it possible to avoid looping for a long time while working
with a fast enough peer when data are added to the socket buffer faster
than we are able to read and process them (ticket #1431).  This is
basically what we already do on FreeBSD with kqueue, where information
about the number of bytes in the socket buffer is returned by
the kevent() call.

With other event methods rev->available is now set to -1 when the socket
is ready for reading.  Later in ngx_recv() and ngx_recv_chain(), if
full buffer is received, real number of bytes in the socket buffer is
retrieved using ioctl(FIONREAD).  Reading more than this number of bytes
ensures that even with edge-triggered event methods the event will be
triggered again, so it is safe to stop processing of the socket and
switch to other connections.

Using ioctl(FIONREAD) only after reading a full buffer is an optimization.
With this approach we only call ioctl(FIONREAD) when there are at least
two recv()/readv() calls.
2019-10-17 16:02:19 +03:00
..
cc Win32: defined pdb path. 2019-04-04 19:30:47 +03:00
lib Configure: fixed compiler warnings with "-Wall -Wextra". 2018-07-24 18:46:54 +03:00
os Win32: enabled both select and poll on Windows by default. 2019-01-24 22:00:13 +03:00
types Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
configure Configure: fix compilation on MSYS2 / MinGW64. 2017-06-06 18:13:39 +03:00
define Copyright updated. 2012-01-18 15:07:43 +00:00
endianness Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
feature Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
have Copyright updated. 2012-01-18 15:07:43 +00:00
have_headers Copyright updated. 2012-01-18 15:07:43 +00:00
headers Copyright updated. 2012-01-18 15:07:43 +00:00
include Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
init Dynamic modules: do not overwrite old modules on install. 2016-03-10 16:50:13 +03:00
install Configure: style. 2016-03-10 18:31:05 +03:00
make Configure: added explicit ngx_binext to the linker output argument. 2019-01-30 19:28:27 +03:00
module Configure: honor dependencies of dynamic modules. 2016-11-21 16:49:19 +03:00
modules Unconditional compilation of the postpone filter. 2019-05-08 19:22:13 +03:00
nohave Copyright updated. 2012-01-18 15:07:43 +00:00
options Unconditional compilation of the postpone filter. 2019-05-08 19:22:13 +03:00
sources Win32: added WSAPoll() support. 2019-01-24 21:51:21 +03:00
stubs Copyright updated. 2012-01-18 15:07:43 +00:00
summary Internal md5 and sha1 implementations are now always used. 2016-06-30 18:57:39 +03:00
threads Configure: fixed static compilation with OpenSSL 1.1.1. 2018-03-22 15:55:57 +03:00
unix Events: available bytes calculation via ioctl(FIONREAD). 2019-10-17 16:02:19 +03:00