Package com.subgraph.orchid.circuits.cells

Examples of com.subgraph.orchid.circuits.cells.RelayCellImpl


    if(autoclose) {
      circuit.markForClose();
    }
   
    if(!relayEndReceived) {
      final RelayCell cell = new RelayCellImpl(circuit.getFinalCircuitNode(), circuit.getCircuitId(), streamId, RelayCell.RELAY_END);
      cell.putByte(RelayCell.REASON_DONE);
      circuit.sendRelayCellToFinalNode(cell);
    }
  }
View Full Code Here


    }
  }

  public void openDirectory(long timeout) throws InterruptedException, TimeoutException, StreamConnectFailedException {
    streamTarget = "[Directory]";
    final RelayCell cell = new RelayCellImpl(circuit.getFinalCircuitNode(), circuit.getCircuitId(), streamId, RelayCell.RELAY_BEGIN_DIR);
    circuit.sendRelayCellToFinalNode(cell);
    waitForRelayConnected(timeout);
  }
View Full Code Here

    waitForRelayConnected(timeout);
  }

  void openExit(String target, int port, long timeout) throws InterruptedException, TimeoutException, StreamConnectFailedException {
    streamTarget = target + ":"+ port;
    final RelayCell cell = new RelayCellImpl(circuit.getFinalCircuitNode(), circuit.getCircuitId(), streamId, RelayCell.RELAY_BEGIN);
    cell.putString(target + ":"+ port);
    circuit.sendRelayCellToFinalNode(cell);
    waitForRelayConnected(timeout);
  }
View Full Code Here

      }
    }
  }
 
  RelayCell createRelayCell(int relayCommand, int streamId, CircuitNode targetNode) {
    return new RelayCellImpl(targetNode, circuitId, streamId, relayCommand);
  }
View Full Code Here

    return node;

  }

  public RelayCell createRelayCell(int command) {
    return new RelayCellImpl(circuit.getFinalCircuitNode(), circuit.getCircuitId(), 0, command, true);
  }
View Full Code Here

      stream.waitForSendWindowAndDecrement();
      stream.getCircuit().sendRelayCell(currentOutputCell);
      bytesSent += (currentOutputCell.cellBytesConsumed() - RelayCell.HEADER_SIZE);
    }

    currentOutputCell = new RelayCellImpl(stream.getTargetNode(), stream.getCircuit().getCircuitId(),
        stream.getStreamId(), RelayCell.RELAY_DATA);
  }
View Full Code Here

TOP

Related Classes of com.subgraph.orchid.circuits.cells.RelayCellImpl

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.