tcpclient - create an outgoing TCP connection


tcpclient [ -46hHrRdDqQv ] [ -i localip ] [ -p localport ] [ -T timeoutconn ] [ -l localname ] [ -t timeoutinfo ] [ -I ifname ] host port program [ arg ... ]


tcpclient attempts to connect to a TCP server. If it is successful, it runs program with the given arguments, with descriptor 6 reading from the network and descriptor 7 writing to the network.

The server's address is given by host and port. host may be 0, referring to the local machine, a compactified IPv6 address, or a dotted-decimal IPv4 address, or a host name; if a host has several IP addresses, tcpclient tries each in turn. port may be a numeric port number or a port name.

tcpclient sets up several environment variables, as described in tcp-environ(5).


Data-Gathering Options

See Also

argv0(1), fixcr(1), recordio(1), tcpserver(1), tcprules(1), listen(2), tcp-environ(5)