Examples of PeerWireProtocol


Examples of com.torrent4j.net.peerwire.PeerWireProtocol

   * @throws IOException
   * @throws InterruptedException
   */
  public static void main(String[] args) throws IOException, InterruptedException {
    final TorrentController controller = new TorrentController(
        new PeerWireProtocol(), new InMemoryTorrentStorage());
    controller.start(1234);
   
    final Torrent torrent = Torrent.load(Paths.get("test.torrent"));
    System.out.println("Torrent hash is " + torrent.getHash().getString());

View Full Code Here

Examples of com.torrent4j.net.peerwire.PeerWireProtocol

   *
   * @param storage
   *            the storage to use
   */
  public TorrentController(TorrentStorage storage) {
    this(new PeerWireProtocol(), storage);
  }
View Full Code Here

Examples of com.torrent4j.net.peerwire.PeerWireProtocol

  /**
   * Creates a new controller with {@link PeerWireProtocol} as default
   * protocol and {@link NIOTorrentStorage} as default storage.
   */
  public TorrentController() {
    this(new PeerWireProtocol(), new NIOTorrentStorage());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.