public class ExampleUtils extends Object
Constructor and Description |
---|
ExampleUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
bootstrap(Peer[] peers)
Bootstraps peers to the first peer in the array.
|
static Peer[] |
createAndAttachNodes(int nr,
int port)
Create peers with a port and attach it to the first peer in the array.
|
public static void bootstrap(Peer[] peers)
peers
- The peers that should be bootstrappedpublic static 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
- IOExceptionCopyright © 2013. All Rights Reserved.