conn-tools
Software
www.skarnet.org
The tcpconnect2 program
tcpconnect2 establishes a connection to an Internet domain socket.
It copies stdin to the writing end of the socket, and the reading end
of the socket to stdout.
Interface
tcpconnect2 host port
- tcpconnect2 establishes a TCP connection to the host
host on port port. It exits 111 on a
hard error. It exits 0 when either stdin closes or the server
closes the connection.
Internals
tcpconnect2 is an execline script that simply calls
tcpclient2, a program similar to
tcpclient,
with ioconnect as its argument.
Notes
- tcpconnect2 is very similar to
mconnect,
except that it does no CRLF conversion, has no host and port defaults, and
properly closes the connection on client request
as well as on server request. This is achieved by the
ioconnect shutdown hack.