Package com.torrent4j.net.peerwire

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


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

  /**
   * 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

Related Classes of com.torrent4j.net.peerwire.PeerWireProtocol

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.