runme | ||||
---|---|---|---|---|
|
The program consists of a server and a client that communicate over a network using a "TCP-Like" protocol created from scratch. It uses and runs over the UDP protocol to send data, implementing a Three Way Handshake, CRC Checksum, Optimize Buffer and Automatic Repeat Request (ARQ) Go-Back-N. The program uses Python 3 and built-in libraries such as socket, struct, io, etc.
- Three Way Handshake
- File Transfer with Automatic Repeat Request (ARQ) Go-Back-N
- Optimize Buffer
- Metadata
- Parallelization
- Two end device communication (Virtual with Docker)
- Python 3.10 (minimal)
- Docker
-
Make sure the files to be sent are available
-
Run Server with certain arguments
python Server.py [-h] [-bip BROADCAST_IP] [-bp BROADCAST_PORT] [-ip INPUT_PATH]
Example:
python Server.py -bip 127.0.0.1 -bp 3001 -ip ./test/video.mkv
-
Run Client with certain arguments (Make sure broadcast port and clients port are different)
python Client.py [-h] [-cip CLIENT_IP] [-cp CLIENT_PORT] [-bip BROADCAST_IP] [-bp BROADCAST_PORT] [-op OUTPUT_PATH]
Example:
python Client.py -cip 127.0.0.1 -cp 3002 -bip 127.0.0.1 -bp 3001 -op video.mkv
-
You can run more than one client at a time.
-
If transfer is succesful, file will be written in folder
out
-
Run docker-compose.yml
docker compose up --build
-
Jump into each container (A server and at least one client must be run). The service name must be the same with the one listed in the docker-compose.yml file.
docker exec -it $(docker compose ps -q <name-service>) sh
Example:
docker exec -it $(docker compose ps -q server) sh // This is for server container docker exec -it $(docker compose ps -q client1) sh // This is for client container
-
Inside the server container, run Server.py with certain arguments. Make sure that the IP and Port is the same as the one listed in he docker-compose.yml file.
python Server.py [-h] [-bip BROADCAST_IP] [-bp BROADCAST_PORT] [-ip INPUT_PATH]
-
Inside the client container, run Client.py with certain arguments. Make sure that the IP and Port is the same as the one listed in he docker-compose.yml file.
python Client.py [-h] [-cip CLIENT_IP] [-cp CLIENT_PORT] [-bip BROADCAST_IP] [-bp BROADCAST_PORT] [-op OUTPUT_PATH]
Name | NIM |
---|---|
Rizky Abdillah Rasyid | 13521109 |
Saddam Annais Shaquille | 13521121 |
Hanif Muhammad Zhafran | 13521157 |