s6-networking
Software
skarnet.org
The s6-tcpserver program
s6-tcpserver is an
UCSPI tool for
TCP connections, i.e. a super-server. It accepts connections from
clients, and forks a program to handle each connection.
Interface
s6-tcpserver [ -q | -Q | -v ] [ -4 | -6 ] [ -1 ] [ -c maxconn ] [ -C localmaxconn ] [ -b backlog ] [ -G gidlist ] [ -g gid ] [ -u uid ] [ -U ] ip port prog...
- s6-tcpserver executes into
s6-tcpserver4 or
s6-tcpserver6 depending on whether
ip is an IPv4 or IPv6 address. It modifies some of its
option syntax to match s6-tcpserver4 and s6-tcpserver6's.
- s6-tcpserver4 or s6-tcpserver6 handles the connection itself.
Options
- -q : be quiet. This is converted into -v 0
for s6-tcpserver4 or s6-tcpserver6.
- -Q : be normally quiet. This is converted into -v 1
for s6-tcpserver4 or s6-tcpserver6. This is the default.
- -v : be verbose. This is converted into -v 2
for s6-tcpserver4 or s6-tcpserver6.
- -4 : IPv4 only. Interpret ip as IPv4; if it is
invalid, exit 100.
- -6 : IPv6 only. Interpret ip as IPv6; if it is
invalid, exit 100. If neither the -4 nor the -6 option is
given, s6-tcpserver will parse ip to determine its family.
- Every other option is passed verbatim to s6-tcpserver4 or s6-tcpserver6.
Notes
- s6-tcpserver executes either into s6-tcpserver4, which only serves
IPv4, or into IPv6, which only serves IPv6. It will not bind to every
available IP address of the machine whether they are v4 or v6; on the
other hand, it can bind to every available IPv4 address (if ip
is 0.0.0.0) or to every available IPv6 address (if ip
is ::). Two instances of s6-tcpserver can cover every
available address.