Skip to content

Easily transfer both small and very large files over TCP with no dependencies

License

Notifications You must be signed in to change notification settings

ivanrg99/easytransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Transfer

Easily transfer both small and very large files over TCP with no dependencies

Go Report Card

Usage

Start the server on localhost, port 8080, with a chunk size of 500MB and a destination folder of . (the current directory)

easytransfer -serve -address localhost:8080 -chunk 500 -destination .

To start the client and send the files to the address 192.168.10.87 and port 8080, with a chunk size of 500MB

easytransfer -address 192.168.10.87:8080 -chunk 500 file1 file2 file3...

To get more help:

easytransfer --help

Overview

The server will put all received files into the destination path specified at startup. The server can handle multiple concurrent requests. The client will send all specified files to the easytransfer server running on the given address and port number at the same time.

What is the chunk size?

The chunk size of the server is the buffer that easytransfer will allocate for each concurrent file upload request. The bigger the chunk size, the bigger the buffer and the faster it will perform. Easytransfer reads data until the buffer is full, and then flushes the data into the destination file on disk. Disk I/O is expensive (so is logging, and we'll have an option to disable it in the future), so a bigger chunk size makes it more performant by writing to disk less often.

⚠️ For each concurrent file upload, a buffer is allocated of the specified chunksize. If you specify a chunk size of 1GB and send 10 files at the same time from the client, the server will allocate 10GB of memory! Easytransfer gives you control of the chunk size used to stream the file, so use that to your advantage when passing files from computers. You can restart and spawn the server easily to readjust the chunk size as needed, as well as specify a different destination folder.

The same is true for the chunk size of the client. For each file that it sends concurrently, it will allocate a buffer with the given chunk size, and use it to stream the file to the server over the network.

Building

Just run

go build .

Releases

You can find pre-built binaries for Windows amd64 and Linux amd64 (built on WSL) on the releases page

Roadmap

  • Make logs optional with verbose
  • Make more UNIX-y in general
  • Man pages
  • Optional encryption
  • Ability to resume partial transfers
  • Support sending folders (add a recursive flag and apply it to a folder)
  • Add better error handling (timeouts when writing to server for ex)
  • Add documentation and tests
  • Add better progress report inside buffer reading (instead of 1 update per full buffer read)

About

Easily transfer both small and very large files over TCP with no dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages