Files
xserver/os
Enrico Weigelt, metux IT consult 1c13cfa6ca os: io: factor out making room in output buffer
First step for simplifying the output path - this is really complicated now:

FlushClient() is called in two cases:

a) we really need to send out critical data (eg. critical events now),
   here we have no extra data
b) going to write new data in the output buffer, but it's already full
   here we do have extra data

In case b) (only called from WriteToClient()) we're first trying to write out
as much as we can, and if there's still not enough room, the buffer is resized.
The write-out path is a complex look trying to write buffered data first, then
the new data. That's even more complex since using writev() with 3 pieces
(old buffer, new data, padding), and considering each of those could be written
just partially.

By the way, there's really no need that the new data is strictly written
along with the already buffered one - practically that's not even any actual
performance optimization - so it's just making things unncessarily complicated.

Therefore reduce it to what's really needed: ensure enough room in the output
buffer (and potentially flush out or resize the buffer). In a later, remove the
whole extra data part from FlushClient(), as it's not needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 15:55:36 +02:00
..
2025-06-12 16:49:45 +02:00
2024-04-15 19:54:34 +00:00
2024-10-10 13:38:31 +00:00
2025-07-18 22:24:55 +02:00
2024-05-08 09:37:35 +02:00
2024-03-09 17:34:51 +00:00
2025-06-12 17:21:44 +02:00
2025-06-12 17:21:46 +02:00
2025-06-12 17:21:48 +02:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2025-06-12 17:21:44 +02:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2025-06-12 16:49:45 +02:00
2025-02-23 17:46:13 +00:00
2025-07-31 17:01:10 +02:00
2025-06-12 16:49:45 +02:00