diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-12 09:34:23 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-26 06:46:31 -0700 |
| commit | b673fa09c39e3dc86cbfb49efc5d2bbf8149af72 (patch) | |
| tree | aab8a5309fac1728c8e882ce745e291d24462bb7 /src/gui/doc/snippets/textdocument-css/main.cpp | |
| parent | 4a46ba1209907796f4a14f6feb35ed4d70155d7d (diff) | |
QDnsLookup/Unix large replies: use res_nmkquery & res_nsend [1/3]
The current code is inefficient when dealing with replies exceeding the
PACKETSZ default size and especially those that require the use of a
Virtual Circuit (TCP socket). When the TC (Truncated) bit is set in the
DNS reply header, res_nquery() automatically switches to VC so it is
able to return the full size of the reply to us. This means we make the
same request four times:
1) over UDP, getting ~512 bytes of data
2) over TCP, getting the full reply but returning ~512 to us
3) over UDP again, getting (maybe) 1400 bytes of data
4) over TCP again, getting all the data
This commit splits res_nquery() into its two component functions,
res_nmkquery() and res_nsend(). This is incomplete: the four queries
above still happen.
Change-Id: I3e3bfef633af4130a03afffd175e728d96d6a604
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-css/main.cpp')
0 files changed, 0 insertions, 0 deletions
