public class ExampleUtils extends Object
| Constructor and Description |
|---|
ExampleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bootstrap(net.tomp2p.p2p.Peer[] peers)
Bootstraps peers to the first peer in the array.
|
static void |
bootstrap(net.tomp2p.dht.PeerDHT[] peers) |
static net.tomp2p.p2p.Peer[] |
createAndAttachNodes(int nr,
int port)
Create peers with a port and attach it to the first peer in the array.
|
static net.tomp2p.dht.PeerDHT[] |
createAndAttachPeersDHT(int nr,
int port) |
static net.tomp2p.tracker.PeerTracker[] |
createAndAttachPeersTracker(net.tomp2p.dht.PeerDHT[] peers) |
public static void bootstrap(net.tomp2p.p2p.Peer[] peers)
peers - The peers that should be bootstrappedpublic static void bootstrap(net.tomp2p.dht.PeerDHT[] peers)
public static net.tomp2p.p2p.Peer[] createAndAttachNodes(int nr,
int port)
throws IOException
nr - The number of peers to be createdport - The port that all the peer listens to. The multiplexing is done via the peer IdIOException - IOExceptionpublic static net.tomp2p.dht.PeerDHT[] createAndAttachPeersDHT(int nr,
int port)
throws IOException
IOExceptionpublic static net.tomp2p.tracker.PeerTracker[] createAndAttachPeersTracker(net.tomp2p.dht.PeerDHT[] peers)
throws IOException
IOExceptionCopyright © 2014. All rights reserved.