added an argument to specify the network interface to use for communication
This commit is contained in:
parent
f28454c2b2
commit
cef9cea12c
2 changed files with 22 additions and 2 deletions
|
@ -8,10 +8,14 @@ d'inséré une machine inconnu pour pertuber le réseau.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Cet application nécessite que votre machine utilise `Python >= 3.13` avec `chrony`
|
||||||
|
pour synchroniser les machines entre elles.
|
||||||
|
|
||||||
Debian
|
Debian
|
||||||
```bash
|
```bash
|
||||||
# dependencies
|
# dependencies
|
||||||
sudo apt install ffmpeg
|
sudo apt upgrade
|
||||||
|
sudo apt install -y git ffmpeg libportaudio2
|
||||||
|
|
||||||
# download the project
|
# download the project
|
||||||
git clone https://git.faraphel.fr/study-faraphel/M2-PT-DRP
|
git clone https://git.faraphel.fr/study-faraphel/M2-PT-DRP
|
||||||
|
|
|
@ -1,5 +1,21 @@
|
||||||
|
import argparse
|
||||||
|
|
||||||
from source.managers import Manager
|
from source.managers import Manager
|
||||||
|
|
||||||
|
|
||||||
manager = Manager("wlp1s0")
|
parser = argparse.ArgumentParser(
|
||||||
|
prog="ISRI-DRP",
|
||||||
|
description="Create a network of machine that try to play an audio file synchronously."
|
||||||
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-i", "--interface",
|
||||||
|
required=True,
|
||||||
|
help="The interface on which other peers are accessible."
|
||||||
|
)
|
||||||
|
|
||||||
|
arguments = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
manager = Manager(arguments.interface)
|
||||||
manager.loop()
|
manager.loop()
|
||||||
|
|
Loading…
Reference in a new issue