当前位置: 首页>>代码示例>>Java>>正文


Java Cell.RELAY属性代码示例

本文整理汇总了Java中com.subgraph.orchid.Cell.RELAY属性的典型用法代码示例。如果您正苦于以下问题:Java Cell.RELAY属性的具体用法?Java Cell.RELAY怎么用?Java Cell.RELAY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.subgraph.orchid.Cell的用法示例。


在下文中一共展示了Cell.RELAY属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processCell

private void processCell(Cell cell) {
	updateLastActivity();
	final int command = cell.getCommand();

	if(command == Cell.RELAY) {
		processRelayCell(cell);
		return;
	}

	switch(command) {
	case Cell.NETINFO:
	case Cell.VERSIONS:
	case Cell.CERTS:
	case Cell.AUTH_CHALLENGE:
		connectionControlCells.add(cell);
		break;

	case Cell.CREATED:
	case Cell.CREATED_FAST:
	case Cell.DESTROY:
		processControlCell(cell);
		break;
	default:
		// Ignore everything else
		break;
	}
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:27,代码来源:ConnectionImpl.java

示例2: RelayCellImpl

public RelayCellImpl(CircuitNode node, int circuit, int stream, int relayCommand, boolean isRelayEarly) {
	super(circuit, (isRelayEarly) ? (Cell.RELAY_EARLY) : (Cell.RELAY));
	this.circuitNode = node;
	this.relayCommand = relayCommand;
	this.streamId = stream;
	this.isOutgoing = true;
	putByte(relayCommand);	// Command
	putShort(0);			// 'Recognized'
	putShort(stream);		// Stream
	putInt(0);				// Digest
	putShort(0);			// Length	
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:12,代码来源:RelayCellImpl.java

示例3: createFromCell

public static RelayCell createFromCell(CircuitNode node, Cell cell) {
	if(cell.getCommand() != Cell.RELAY)
		throw new TorException("Attempted to create RelayCell from Cell type: "+ cell.getCommand());
	return new RelayCellImpl(node, cell.getCellBytes());
}
 
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:5,代码来源:RelayCellImpl.java


注:本文中的com.subgraph.orchid.Cell.RELAY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。