It's a simple example which illustrates file uploading/downloading implemented with Erlang language.
There are 2 scripts called run_client.sh
and run_server.sh
which you can use to simplify process of starting client and server.
- erlc *.erl; escript server.erl
- Change HOST macros in config.hrl. (setup your server ip address)
- erlc *.erl; escript client.erl
To download file, use below command:
DOWNLOAD \<filename\> (with extension)
To upload file, use below command:
UPLOAD \<filename\> (with extension)
Just type EXIT.
- DOWNLOAD movie.mp4
- UPLOAD movie.mp4
file-transfer
├── server.erl
├── client.erl
├── utils.erl
├── config.hrl
├── client
│ ├── movie.mp4
└── server
└── movie.mp4