mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 07:54:33 +00:00
36a5c5389d
This function works like a traditional putchar() except that it can return 0 if the output buffer is full. Now a basic character-based echo function would look like this, from a stream interface : while (1) { c = buffer_si_peekchar(req); if (c < 0) break; if (!buffer_si_putchar(res, c)) { si->flags |= SI_FL_WAIT_ROOM; break; } buffer_skip(req, 1); req->flags |= BF_WRITE_PARTIAL; res->flags |= BF_READ_PARTIAL; } |
||
---|---|---|
.. | ||
common | ||
import | ||
proto | ||
types |