Ejemplo n.º 1
0
        /// <summary>
        /// Get available nodes of the network. Can only be run the coordinator.
        /// </summary>
        /// <param name="hanlder">handler of the result</param>
        public void NodeDiscoveryRequest(NodeDiscoveryConfirmHandler handler)
        {
            if (handler == null)
                return;
            Status status = Status.Success;
            UInt16[] nodes = null;

            if (!_isRunning)
            {
                status = Status.NotRunning;
            }
            else if (!_isAddrServer)
            {
                status = Status.Error;
            }

            if (status == Status.Success)
            {
                nodes = _addrServer.GetNodes();
            }

            handler.Invoke(_net, status, nodes);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get available nodes of the network. Can only be run the coordinator.
 /// </summary>
 /// <param name="hanlder">handler of the result</param>
 public void NodeDiscoveryRequest(NodeDiscoveryConfirmHandler handler)
 {
     _route.NodeDiscoveryRequest(handler);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Get available nodes of the network. Can only be run the coordinator.
 /// </summary>
 /// <param name="hanlder">handler of the result</param>
 public void NodeDiscoveryRequest(NodeDiscoveryConfirmHandler handler)
 {
     _route.NodeDiscoveryRequest(handler);
 }