public class APITest {
public static final String VERSION = "$Id: APITest.java,v 1.3 2005/04/12 13:04:15 sanity Exp $";
public static void main(String[] args) throws Exception {
JavaAPI api = new JavaAPI();
api.start(new String[] {"seednode=none"});
Thread.sleep(20000); //manually start another peer here if you want
Peer[] peers = api.getConnectedPeers();
System.out.println("peers = " + peers.length);
for (int i = 0; i < peers.length; i++) {
Peer peer = peers[i];
System.out.println("peer = " + peer);
PeerInfo info = api.getPeerInfo(peer);
System.out.println("info = " + info);
}
}