An RPC-based file transfer client and server written in Go.
Clone the repository and run the following command to build the binary:
go buildThis will generate an executable file named gotransfer.
gotransfer operates in two modes: client and server.
To serve files, start the application in server mode.
./gotransfer -mode server -dir /path/to/serve/files -addr :12427-mode: Set toserver.-dir: The directory containing the files to be served (defaults to./).-addr: The address and port for the server to listen on (defaults to:12427).
To download a file from the server, start the application in client mode.
./gotransfer -mode client -remotefile a.txt -localfile b.txt -addr 127.0.0.1:12427This will download a.txt from the server and save it as b.txt on the client side.
| Flag | Description | Default Value | Mode |
|---|---|---|---|
-mode |
The execution mode (client or server) |
client |
Both |
-addr |
The address for the server to listen on, or for the client to connect to | :12427 |
Both |
-dir |
The directory from which the server serves files | ./ |
Server |
-remotefile |
The name of the remote file to download | "" | Client |
-localfile |
The name of the local file to save as (defaults to the value of -remotefile) |
"" | Client |
-resumeId |
The session ID to resume a download | 0 |
Client |