Package com.turn.ttorrent.client

Examples of com.turn.ttorrent.client.Client


      usage(System.err);
      System.exit(1);
    }

    try {
      Client c = new Client(
        getIPv4Address(ifaceValue),
        SharedTorrent.fromFile(
          new File(otherArgs[0]),
          new File(outputValue)));

      c.setMaxDownloadRate(maxDownloadRate);
      c.setMaxUploadRate(maxUploadRate);

      // Set a shutdown hook that will stop the sharing/seeding and send
      // a STOPPED announce request.
      Runtime.getRuntime().addShutdownHook(
        new Thread(new Client.ClientShutdown(c, null)));

      c.share(seedTimeValue);
      if (Client.ClientState.ERROR.equals(c.getState())) {
        System.exit(1);
      }
    } catch (Exception e) {
      logger.error("Fatal error: {}", e.getMessage(), e);
      System.exit(2);
View Full Code Here

TOP

Related Classes of com.turn.ttorrent.client.Client

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.