本文整理汇总了C#中Brunet.Node.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# Node.GetHashCode方法的具体用法?C# Node.GetHashCode怎么用?C# Node.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brunet.Node
的用法示例。
在下文中一共展示了Node.GetHashCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LeafConnectionOverlord
public LeafConnectionOverlord(Node local)
{
_compensate = 0;
_local = local;
_linker = null;
_sync = new object();
_rnd = new Random( _local.GetHashCode()
^ unchecked((int)DateTime.UtcNow.Ticks) );
_default_retry_interval = new TimeSpan(0,0,0,0,10000);
_current_retry_interval = new TimeSpan(0,0,0,0,10000);
//We initialize at at year 1 to start with:
_last_retry = DateTime.MinValue;
_last_non_leaf_connection_event = DateTime.MinValue;
_last_trim = DateTime.MinValue;
/*
* When a node is removed from the ConnectionTable,
* we should check to see if we need to work to get a
* replacement
*/
lock(_sync) {
local.ConnectionTable.DisconnectionEvent += this.CheckAndConnectHandler;
local.ConnectionTable.ConnectionEvent += this.CheckAndConnectHandler;
/**
* Every heartbeat we check to see if we need to act
*/
local.HeartBeatEvent += this.CheckAndConnectHandler;
}
}