summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/main.c
diff options
context:
space:
mode:
authorjacekm <jacekm@openbsd.org>2009-12-23 17:16:03 +0000
committerjacekm <jacekm@openbsd.org>2009-12-23 17:16:03 +0000
commitf4ef9244ebda86d15962739f7b9b770486943c5d (patch)
treedcfc1f845ac781f56a14da9c733306a1142ed0a2 /usr.bin/mandoc/main.c
parentLoopback interface don't have link local addresses so use the real IPv6 (diff)
downloadwireguard-openbsd-f4ef9244ebda86d15962739f7b9b770486943c5d.tar.xz
wireguard-openbsd-f4ef9244ebda86d15962739f7b9b770486943c5d.zip
Implementation of RFC 2920 PIPELINING extension, client side only for now.
This restructures the client_* API internals significantly. The code becomes pipelining in nature. All SMTP commands are put on the output queue and dequeued as quickly as possible. Once dequeued, they're moved to the receive queue so that replies can be matched with previous commands. Dequeuing commands from the output queue halts when the count of commands currently in-pipeline (``cmdi'') is equal to the command send window (``cmdw''). There are three cmdw values useful in practice: 0 clear pipeline, ie. inhibit all future sends 1 disable pipelining, ie. use old ``one-request-one-reply`` mode SIZE_T_MAX enable pipelining, ie. dequeue as many commands as possible At the beginning of session cmdw is 1. When it is found that peer supports PIPELINING, it grows to SIZE_T_MAX. After dequeing DATA it is again 1. After sending QUIT it is 0. Each command dequeued from the output queue becomes a buf in a msgbuf. The act of combining multiple commands into a single send operation did not need to be implemented: buf_write() already combines bufs using iovec and sends them at once using sendmsg(2). Tested by todd@ and oga@ "looks good" to gilles@
Diffstat (limited to 'usr.bin/mandoc/main.c')
0 files changed, 0 insertions, 0 deletions