Reference Manual

NAME

tcp - establish a TCP connection, copy STDIN to the connection, copy incoming data to STDOUT
SYNOPSIS
tcp hostname [rport [lport]]
DESCRIPTION
Command tcp opens a connection to the specified hostname at rport or Port 7 (the Echo Port). The local port number defaults to a value in the range 1..1023. If lport is specified, the local port for the outgoing connection will be set to lport. Data from STDIN is then written to the connection, while data received from the connection is written to STDOUT. An empty line (two \n characters in succession) terminates the connection.

Command tcp is used primarily for testing reachability of remote sites at the TCP level. When combined with shell redirection, it can also be used for throughput tests.

SEE ALSO
udp