tcp_pipe is a simple commandline
UNIX® utility to extend raw
unidirectional commandline piping over a TCP/IP connection, released
under the GNU GPL. It uses SDL_net, ergo SDL and SDL_net must be
installed for it to compile and run. By default, it reads from stdin
or writes to stdout. No error correction or detection is performed,
that's all left up to TCP/IP. So far I have tested it under Linux x86
and Linux x86-64.
By no means do I reccomend this program's use in production code, nor guarantee it's performance under any circumstances. Use FTP for that. tcp_pipe is a simple hack that I use to transfer large amounts of data between two machines not just on the same network, but in the same room.
Commandline syntax is very simple:
Run the receiving program first. It will wait until the specified host connects, stream recieved data to stdout until connection is broken, then exit.
Once the recieving program is ready, run the sending program. It will attempt to connect to the specified host at the specified port, stream data from stdin until EOF, then exit. The sequence shown above will stream the raw binary data in myfile.tar.gz from 22.214.171.124 to 126.96.36.199, piping it into a new file when recieved.
To stream multiple files, one might use the gnu tar command:
The sending computer will compress files in the local directory(see man tar for details of it's use) and pipe the compressed binary stream to recieving.host:9999. The recieving computer will pipe the raw binary stream back through tar, decompressing it and recreating the sent files.
Send comments, patches, ports etc to Tyler Montbriand, firstname.lastname@example.org.