57 |
while(i<argv.length) { |
while(i<argv.length) { |
58 |
if(argv[i].equals("-pub")) { |
if(argv[i].equals("-pub")) { |
59 |
i++; |
i++; |
60 |
System.out.println("Publish pool: "+argv[i]); |
p("Publish pool: "+argv[i]); |
61 |
publishedPool = new DirPool(new File(argv[i]), |
publishedPool = new DirPool(new File(argv[i]), |
62 |
Collections.EMPTY_SET); |
Collections.EMPTY_SET); |
63 |
} else if(argv[i].equals("-gw")) { |
} else if(argv[i].equals("-gw")) { |
82 |
GispPeer peer = new GispPeer(publishedPool, |
GispPeer peer = new GispPeer(publishedPool, |
83 |
new TransientPool(Collections.EMPTY_SET), |
new TransientPool(Collections.EMPTY_SET), |
84 |
gisp_port, seeds); |
gisp_port, seeds); |
85 |
|
if(gisp_port == GispP2PMap.PORT) |
86 |
|
p("GISP UDP port: default of "+gisp_port); |
87 |
|
else |
88 |
|
p("GISP UDP port: "+gisp_port); |
89 |
if(gateway_port >= 0) { |
if(gateway_port >= 0) { |
90 |
new HTTPProxy(peer.getPool(), gateway_port).run(); |
new Thread(new HTTPProxy(peer.getPool(), gateway_port)) |
91 |
|
.start(); |
92 |
|
p("HTTP gateway port: "+gateway_port); |
93 |
} |
} |
94 |
|
if(seeds.length == 0) { |
95 |
|
p(""); |
96 |
|
p("No seed peers given, starting new network."); |
97 |
|
p("Give this peer as a seed to other peers."); |
98 |
|
} else |
99 |
|
p("Trying to use "+seeds[0]+" as the first seed peer."); |
100 |
|
p(""); |
101 |
|
p("Peer running."); |
102 |
} |
} |
103 |
} |
} |