The FileTransfer Sample

The FileTransfer Sample

FileTransfer is a simple command-line utility that can be used to transfer files from one host to another.

The program is operated from the command line, and can be invoked using the following syntax:

FileTransfer receive tcp|udp <port>
FileTransfer send tcp|udp <hostname> <port> <filename>

For example:

Start a server in UDP mode, waiting in the port 2345 for a client to submit a file.

FileTransfer receive udp 2345

Upload a file to a server using UDP mode.

FileTransfer send udp 192.168.0.100 2345 file.dat

The output should look similar to the following:

C:\Users\clb\Desktop\FileTransfer>FileTransfer send udp 192.168.0.100 2345 JessicaAlbaNude.jpg
Connected to 192.168.0.100:2345 (UDP, connected=true, maxSendSize=1400, sock: 192.168.0.22:58374, peer: 192.168.0.100:2345).
Starting file transfer.
File transfer finished in 1.45 seconds.
Closed connection to 192.168.0.100:2345 (UDP, connected=true, maxSendSize=1400, sock: 192.168.0.22:58374, peer: 192.168.0.100:2345).
C:\Users\clb\Desktop\FileTransfer>
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines