Package dijjer.api

Examples of dijjer.api.JavaAPI


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);
    }
  }
View Full Code Here

TOP

Related Classes of dijjer.api.JavaAPI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.