Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,26 @@
1. Run the peer command as shown above.
2. Use the following command to download a file:
```bash
download
download <!FILEHASH!>
```

---

## Broadcasting Files
1. Run the peer command as shown above.
2. Use the following command to broadcast a file:

```bash
broadcastfile <!FILEPATHINOS!>
```

## Reciving Broadcast Files
1. Run the peer command as shown above.
2. Use the following command to receive a broadcast file:

```bash
broadcastrecieve <!FILEHASH!>
```
## How to Test
1. In the `test` directory, add a file containing the paths of all the files to be tested.
2. Run the following command to start testing:
Expand Down
6 changes: 6 additions & 0 deletions config.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
test.dir=./src/test
downloads.dir=./src/downloads

# Broadcast Settings
broadcast.listening.port=12345
registration.port=12346
broadcast.count=3
registration.timeout=5000
2 changes: 1 addition & 1 deletion src/Main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static void main(String[] args) throws IOException {


Scanner scanner = new Scanner(System.in);
System.out.print("Enter command (upload <FilePath> or download <FileHash>): ");
System.out.print("Enter command (upload <FilePath>|download <FileHash>| broadcastfile <FilePath> |broadcastrecieve <FileHash>): ");

while (true) {

Expand Down
Loading