If pen is started with the -C option, it can be controlled by connecting
to the control port. Each command is a single line. Pen acts on the
command and then closes the connection.

This is of course meant to be used by an application, but the protocol
is simple enough that it is possible to just telnet into the port and
type the commands manually. This is currently the only way since no
control application has been written yet.

There are obvious security implications which have not been taken into
consideration yet. If pen is running on a dedicated host with no local
users, it is pretty safe to listen to localhost:8888 or some other port
on localhost. SSH or stunnel can then be used to tunnel connections
across a network.


Commands are case sensitive. Available control commands:

ascii
	Communication dumps in ascii format (cf option -a).

no ascii
	Communication dumps in hex format.

blacklist
	Return current blacklist time in seconds.

blacklist T
	Set the blacklist time in seconds.

block
	Do not make sockets nonblocking.

no block
	Make sockets nonblocking.

clients_max
	Return max number of clients.

conn_max
	Return max number of simultaneous connections.

control
	Return address and port where pen listens for control connections.

debug
	Return current debug level.

debug N
	Set debug level to N.

delayed_forward
	Always wait for the next round of the main loop before forwarding
	data. Normally pen tries to do that immediately.

no delayed_forward
	Try to forward data immediately, to avoid the overhead of copying
	it to a temporary buffer and waiting for the next main loop round.

hash
	Use a hash on the client IP address for initial server selection.

no hash
	Do not use a hash.

listen
	Return local address and port pen listens to for incoming
	client connections.

log
	Show where pen is logging, if anywhere.

log FILE
	Log to FILE.

mode
	Write a summary of the current mode of operation. The listed modes
	are block, delayed_forward, hash, roundrobin, stubborn.

no log
	Turn off logging.

pid
	Return the process id of the running daemon

recent [N]
	Shows which clients have connected in the last N seconds
	(default 300).

roundrobin
	Use round-robin server selection without client tracking

no roundrobin

server N [ address A | port P | max M | hard H | blacklist T ]
	Change address, port and/or max connections for server N, or
	blacklist it for T seconds.

servers
	List address, port and max number of simultaneous connections
	for each remote server.

status
	Print status information in html format.

stubborn
	If the initial server selection is unavailable, close the
	client connection without trying another

no stubborn

timeout
	Return current connect timeout in seconds.

timeout N
	Set connect timeout to N seconds.

web_stats
	Return file name of html status reports, if any.

web_stats FILE
	Set the name of html status reports.

no web_stats
	Do not generate html status reports.

