Package freenet.io.xfer

Examples of freenet.io.xfer.BulkTransmitter.send()


    final Runnable r = new Runnable() {

      @Override
      public void run() {
        try {
          if(!bt.send())
            Logger.error(this, "Failed to send "+name+" jar blob to " + source.userToString() + " : " + bt.getCancelReason());
          else
            Logger.normal(this, "Sent "+name+" jar blob to " + source.userToString());
          raf.close();
        } catch (DisconnectedException e) {
View Full Code Here


    PartiallyReceivedBulk prb =
      new PartiallyReceivedBulk(node.usm, padded.length, Node.PACKET_SIZE, raf, true);
    try {
      BulkTransmitter bt =
        new BulkTransmitter(prb, peer, xferUID, true, ctr, true, cb);
      return bt.send();
    } catch (DisconnectedException e) {
      throw new NotConnectedException(e);
    }
  }
View Full Code Here

      node.executor.execute(new Runnable() {

        @Override
        public void run() {
          try {
            bt.send();
          } catch (DisconnectedException e) {
            // :|
          } finally {
            synchronized(DarknetPeerNode.this) {
              sendingFullNoderef = false;
View Full Code Here

    final Runnable r = new Runnable() {

      @Override
      public void run() {
        try {
          if(!bt.send())
            Logger.error(this, "Failed to send revocation key blob to " + source.userToString() + " : " + bt.getCancelReason());
          else
            Logger.normal(this, "Sent revocation key blob to " + source.userToString());
        } catch (DisconnectedException e) {
          // Not much we can do here either.
View Full Code Here

    final Runnable r = new Runnable() {

      @Override
      public void run() {
        try {
          if(!bt.send())
            Logger.error(this, "Failed to send "+name+" jar blob to " + source.userToString() + " : " + bt.getCancelReason());
          else
            Logger.normal(this, "Sent "+name+" jar blob to " + source.userToString());
          raf.close();
        } catch (DisconnectedException e) {
View Full Code Here

       
        @Override
        public void run() {
          source.incrementUOMSends();
          try {
            bt.send();
          } catch (DisconnectedException e) {
            Logger.normal(this, "Disconnected while sending dependency with hash "+HexUtil.bytesToHex(buf.getData())+" to "+source);
          } finally {
            source.decrementUOMSends();
            decrementDependencies(source);
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.