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
10 changes: 0 additions & 10 deletions .classpath

This file was deleted.

28 changes: 0 additions & 28 deletions .project

This file was deleted.

2 changes: 0 additions & 2 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

11 changes: 0 additions & 11 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

Binary file removed bin/Main/Main.class
Binary file not shown.
Binary file removed bin/discovery/CentralRegistry.class
Binary file not shown.
Binary file removed bin/discovery/FileData.class
Binary file not shown.
Binary file removed bin/discovery/Handshake.class
Binary file not shown.
Binary file removed bin/discovery/Node.class
Binary file not shown.
Binary file removed bin/discovery/messages/CentralRegistryRequest.class
Binary file not shown.
Binary file removed bin/discovery/messages/CentralRegistryResponse.class
Binary file not shown.
Binary file removed bin/discovery/messages/FileRequest.class
Binary file not shown.
Binary file removed bin/discovery/messages/FileResponse.class
Binary file not shown.
Binary file removed bin/discovery/messages/TransferRequest.class
Binary file not shown.
Binary file removed bin/discovery/messages/TransferResponse.class
Binary file not shown.
Binary file removed bin/module-info.class
Binary file not shown.
Binary file removed bin/p2p/ConnectionHandlerParallel.class
Binary file not shown.
Binary file removed bin/p2p/ConnectionHandlerSequential.class
Binary file not shown.
Binary file removed bin/p2p/FileTransfer.class
Binary file not shown.
Binary file removed bin/p2p/ObjectTransfer.class
Binary file not shown.
Binary file removed bin/utils/FileTransfer.class
Binary file not shown.
10 changes: 10 additions & 0 deletions config.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
test.dir=./src/test
downloads.dir=./src/downloads

#Defaults
beacon.port=12344
broadcast.group=255.255.255.255
broadcast.port=12345
broadcast.chunk_bytes=1024
broadcast.max_rounds=3
broadcast.nack_port=50011
broadcast.nack_delay_ms=200
broadcast.wait_nacks_ms=250
15 changes: 6 additions & 9 deletions 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 Expand Up @@ -149,14 +149,11 @@ public static void main(String[] args) throws IOException {

break;
case "broadcastfile":
FileData f = new FileData(argument);

System.out.println("The File Hash of the File to be broadcasted is " + f.getFileHash());
System.out.println("Type broadcast to enter broadcasting period");

userInput = scanner.nextLine().trim();
BroadCastTransfer.BroadcastFile(f , Handshake.getClient() , argument);
break;

FileData f = new FileData(argument);
System.out.println("The File Hash of the File to be broadcasted is " + f.getFileHash());
BroadCastTransfer.BroadcastFile(f , Handshake.getClient() , argument);
break;

case "broadcastrecieve":
BroadCastTransfer.RecieveFile(argument);
Expand Down
Loading