nodechan

decentralized peer-to-peer anonymous messageboard client
git clone git://squid-tech.com/nodechan.git
Log | Files | Refs | README

commit 52d45bf044ebcafc533141fa8aa7950a0fc14209
parent 4508c632c900db3d19802ee9211a094202ae3e6b
Author: joshiemoore <jxm5210@g.rit.edu>
Date:   Fri,  9 Aug 2019 03:24:38 -0400

Add the option to not connect to an initial peer from the tracker

Diffstat:
Msrc/NodeChan.java | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/NodeChan.java b/src/NodeChan.java @@ -53,6 +53,9 @@ public class NodeChan { from this client to theirs. **/ public static boolean nohello = false; + /** If true, no initial peer will be retrieved from the tracker. **/ + public static boolean noinitpeer = false; + @@ -83,6 +86,7 @@ public class NodeChan { if (args[i].equals("-nogui")) nogui = true; else if (args[i].equals("-local")) local = true; else if (args[i].equals("-nohello")) nohello = true; + else if (args[i].equals("-noinitpeer")) noinitpeer = true; } System.out.println("Welcome to NodeChan."); @@ -170,12 +174,14 @@ public class NodeChan { peerTrackerURL = input; } - System.out.println("Retrieving initial peer from tracker..."); + if (!noinitpeer) { + System.out.println("Retrieving initial peer from tracker..."); - if (getPeerFromTracker(peerTrackerURL)) { - System.out.println("Initial peer retrieved!"); - } else { - System.out.println("Could not get peer from tracker."); + if (getPeerFromTracker(peerTrackerURL)) { + System.out.println("Initial peer retrieved!"); + } else { + System.out.println("Could not get peer from tracker."); + } } }