This class provides a method to do address resolution over the Brunet Dht, where entries are listed in the dht by means of the DhtDHCPServer.
Inheritance: IAddressResolver
コード例 #1
0
ファイル: DhtIpopNode.cs プロジェクト: acisp2p/brunet
    ///<summary>Creates a DhtIpopNode.</summary>
    /// <param name="NodeConfig">NodeConfig object</param>
    /// <param name="IpopConfig">IpopConfig object</param>
    public DhtIpopNode(NodeConfig node_config, IpopConfig ipop_config,
        DHCPConfig dhcp_config) : base(node_config, ipop_config, dhcp_config)
    {
      DhtAddressResolver dar = new DhtAddressResolver(AppNode.Dht, _ipop_config.IpopNamespace);
      Shutdown.OnExit += dar.Stop;
      _address_resolver = dar;

      _connected = false;
      AppNode.Node.StateChangeEvent += StateChangeHandler;
      StateChangeHandler(AppNode.Node, AppNode.Node.ConState);
    }
コード例 #2
0
        ///<summary>Creates a DhtIpopNode.</summary>
        /// <param name="NodeConfig">NodeConfig object</param>
        /// <param name="IpopConfig">IpopConfig object</param>
        public DhtIpopNode(NodeConfig node_config, IpopConfig ipop_config,
                           DHCPConfig dhcp_config) : base(node_config, ipop_config, dhcp_config)
        {
            DhtAddressResolver dar = new DhtAddressResolver(AppNode.Dht, _ipop_config.IpopNamespace);

            Shutdown.OnExit  += dar.Stop;
            _address_resolver = dar;

            _connected = false;
            AppNode.Node.StateChangeEvent += StateChangeHandler;
            StateChangeHandler(AppNode.Node, AppNode.Node.ConState);
        }