]> git.kaiwu.me - haproxy.git/commit
MEDIUM: h2: enable connection polling for send when a cs wants to emit
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 08:26:19 +0000 (10:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:18 +0000 (18:16 +0100)
commit1d393228e09febd9e039d2fc6b247ba47d182fc6
treeea9d3fdfedbadde3ffd8f211483dd328bfd8a831
parent52eed75ced5d9a89807ca272ddbc618c74e62edd
MEDIUM: h2: enable connection polling for send when a cs wants to emit

A conn_stream indicates its intent to send by setting the WR_ENA flag
and calling mux->update_poll(). There's no synchronous write so the only
way to emit a response from a stream is to proceed this way. The sender
h2s is then queued into the h2c's send_list if it was not yet queued.

Once the connection is ready, it will enter its send() callback to visit
writers, calling their data->send_cb() callback to complete the operation
using mux->snd_buf().

Also we enable polling if the mux contains data and wasn't enabled. This
may happen just after a response has been transmitted using chk_snd().
It likely is incomplete for now and should probably be refined.
src/mux_h2.c