Package me.mabra.hellonzb.nntpclient.nioengine

Examples of me.mabra.hellonzb.nntpclient.nioengine.NettyNioClient$NewTask


    else
    {
      try
      {
        // create NIO client and background thread
        NettyNioClient client = new NettyNioClient(mainApp, false);
        RspHandler handler = new RspHandler(null, false);
        Thread t = new Thread(client);
        t.setDaemon(true);
        t.start();
       
        // test authentication
        client.testAuth(handler);
        start = System.nanoTime();
        while(!handler.isFinished())
        {
          curr = System.nanoTime();
          diff = curr - start;
          if(diff > (HelloNzbConstants.SERVER_TIMEOUT * NANO_MODIFIER))
            break;

          try
          {
            Thread.sleep(10);
          }
          catch(InterruptedException ex)
          {
            // do nothing ...
          }
        }
       
        if(client != null)
          client.shutdown(true, start + (HelloNzbConstants.SERVER_TIMEOUT * NANO_MODIFIER), false);
         
        mainApp.resetThreadView();
       
        if(diff > (HelloNzbConstants.SERVER_TIMEOUT * NANO_MODIFIER))
        {
 
View Full Code Here


          return true// no backup server settings set
        }
      }

      // start NIO client
      NettyNioClient client = backup ? backupNioClient : nioClient;
      if(client == null)
      {
        client = new NettyNioClient(this, backup);
        if(backup)
          backupNioClient = client;
        else
          nioClient = client;
View Full Code Here

    try
    {
      limit = Long.valueOf(reply);
      mainApp.getPrefContainer().setSpeedLimit(reply);
      mainApp.setConnSpeedLimit();
      NettyNioClient nio = mainApp.getCurrNioClient();
      if(nio != null)
        nio.setSpeedLimit(limit);
    }
    catch(NumberFormatException ex) { }
  }
View Full Code Here

TOP

Related Classes of me.mabra.hellonzb.nntpclient.nioengine.NettyNioClient$NewTask

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.