haproxy/include
Willy Tarreau 36a5c5389d [MINOR] buffers: provide buffer_si_putchar() to send a char from a stream interface
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;
	}
2009-09-19 14:53:47 +02:00
..
common [MINOR] acl: add support for hdr_ip to match IP addresses in headers 2009-09-19 14:47:49 +02:00
import [MAJOR] replace ultree with ebtree in wait-queues 2008-06-24 08:17:16 +02:00
proto [MINOR] buffers: provide buffer_si_putchar() to send a char from a stream interface 2009-09-19 14:53:47 +02:00
types [MAJOR] buffers: fix misuse of the BF_SHUTW_NOW flag 2009-09-19 14:53:46 +02:00