S6-TCPCLIENT(8)
π S6-TCPCLIENT(8) π
okay so bestie, this is the manual page for s6-tcpclient β part of the System Manager's Manual, section 8 (that's the "system administration" corner of the manual, iykyk). she's a Unix page and she ate. let's get into it π«Ά
β¨ NAME β¨
s6-tcpclient β the UCSPI client tool[1] for INET domain sockets. literally her whole job π
π SYNOPSIS π
s6-tcpclient [-q | -Q | -v] [-4 | -6] [-d | -D] [-r | -R] [-h] [-H]
[-n | -N] [-t timeout] [-l localname] [-T timeoutconn]
[-i localip] [-p localport] host port prog...
π¦ DESCRIPTION π¦
so what she does is: s6-tcpclient establishes a TCP connection to a server, then executes into a program. that's the whole vibe.
specifically β she establishes a TCP connection to host host port port.
then she executes into prog... with descriptor 6 reading from the network and descriptor 7 writing to it. iconic fd assignment tbh π
πΈ Host address determination πΈ
host may be an IP address, in which case s6-tcpclient will connect to that IP address. and ngl, if the underlying skalibs has been compiled with IPv6 support, host can be an IPv6 address as well as an IPv4 one. versatile queen.
host may also be a domain name, in which case a DNS resolution will be performed on it, and a connection will be tried to all the resulting IP addresses in a round-robin fashion, twice: first with a small timeout, then with a longer timeout. the first address to answer wins π the connection attempt fails if no address in the list is able to answer. like, all of them ghosted her. rude.
β¨ OPTIONS β¨
-qβ be quiet. π€«-Qβ be normally verbose. this is the default, bestie.-vβ be verbose. say more, queen.-4β interpret host as an IPv4 address or make A queries to determine its addresses. do not attempt IPv6.-6β (only valid if the underlying skalibs has IPv6 support) interpret host as an IPv6 address or make AAAA queries to determine its addresses. do not attempt IPv4.-dβ don't use theTCP_NODELAYsocket option. this is the default.-Dβ use theTCP_NODELAYsocket option, which disables Nagle's algorithm. π-rβ try and obtain aTCPREMOTEINFOstring via the IDENT protocol. heads up: this is obsolete and unreliable, and should only be used for compatibility with legacy programs. like, fr fr, only for the old ones.-Rβ do not use the IDENT protocol. this is the default.-hβ consult the/etc/hostsdatabase before performing DNS queries. the default, when this option is not given, is to ignore/etc/hosts. and note the-Hoption overrides-hand voids any kind of lookup. so don't be doing both, ok?-Hβ do not try and obtain the local or remote host names via DNS. the default, when this option is not given, is to look up the local and remote host IPs in the DNS database to get the corresponding names.-nβ qualify host when resolving it to find suitable IP addresses.-Nβ do not qualify host. this is the default.-ttimeout β put a global timeout on the connection attempt. if no fully functional connection has been established after timeout seconds, abort the program. by default, timeout is0, which means no timeout. β°-ilocalip β use localip as the local socket address for the connection. by default, address selection is left to the operating system.-plocalport β use localport as the local socket port for the connection. by default, port selection is left to the operating system.-llocalname β use localname as the value of theTCPLOCALHOSTenvironment variable instead of looking it up via the DNS.-Ttimeoutconn β configure the connection timeouts. timeoutconn must be of the formx+y, where x and y are integers. x is the first timeout and y is the second one: all suitable addresses for host are first tried with a timeout of x seconds, and if all of them fail, then they are tried again with a timeout of y seconds. (be aware that the timeout specified with the-toption overrides everything.) by default, x is2and y is58. β¨
π ENVIRONMENT π
prog... is run with the following variables set:
PROTOβ always set toTCP.TCPREMOTEIPβ set to the chosen IP address of host.TCPREMOTEPORTβ set to port.TCPREMOTEHOSTβ if the-Hoption has been given, set to the name obtained by a reverse DNS resolution of the IP address chosen for host. else unset.TCPLOCALHOSTβ if the-loption has been given, set to localname. else set to the name obtained by a reverse DNS resolution of the IP address chosen for the local host.TCPREMOTEINFOβ if the-roption has been given, set to the information given by an IDENT server on host about the current connection (very unreliable). else unset. π
π SEE ALSO π
[1] https://cr.yp.to/proto/ucspi.txt
this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-networking/s6-tcpclient.html
π AUTHORS π
- Laurent Bercot
- Alexis <flexibeast@gmail.com> (man page port)
okay that's the whole page, no cap. this one's a Debian joint, dated October 12, 2024 β and yes, S6-TCPCLIENT(8) is the header, so now you know exactly which page you're in. go forth and connect, bestie ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: s6-networking 2.8.0.1
- nixpkgs unstable: s6-networking-man-pages 2.7.2.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms