This is a set of utilities I wrote to help test and debug client-server applications. Basically the goal is to let you run a client or server program from a command line prompt or a shell script, so you don't have to write and debug a daemon process.
The package includes the following programs:
tcpcat acts as a standard UNIX filter except one direction is a TCP/IP connection. In server mode, tcpcat waits for a connection and upon connection, relays stdin to the remote peer, and outputs the peer's data on stdout.
In client mode, tcpcat connects to a remote host, and sends stdin to the remote peer, while outputing the response from the host on stdout.
In both cases, since output from the peer can be binary data, you have the option to have non-printing characters displayed in octal or hex. You can also have the program timeout after a specified number of seconds.
udpcat is just like tcpcat, except UDP/IP datagrams are used instead of TCP/IP connections.
telnets is similar to tcpcat in server mode, where it runs and waits for a TCP/IP connection to it. Once connected, it stays connected until the remote host disconnects. The difference here is that tcpcat quits after its stdin is exhausted; telnets is useful for live interactive connections where you type data on the stream yourself.
This is derived from a standard trick using telnet to any service. For example, an easy way to test your webserver is to telnet www.myhost.com 80 and type the HTTP commands directly. telnets is used for this trick when something connects to you, instead of you connecting to it.
There are many other similar programs available by others, because I'm sure many implementors have needed to re-invent this particualr wheel; a few of them are noted below. I've never used them.
Questions? Comments? Bug Reports?
send us e-mail.