Brunet.Symphony.StructuredNode.GetStatus C# (CSharp) Метод

GetStatus() публичный Метод

public GetStatus ( string con_type_string, Address addr ) : StatusMessage
con_type_string string
addr Address
Результат Brunet.Connections.StatusMessage
    override public StatusMessage GetStatus(string con_type_string, Address addr)
    {
      ArrayList neighbors = new ArrayList();
      //Get the neighbors of this type:
      /*
       * Send the list of all neighbors of this type.
       * @todo make sure we are not sending more than
       * will fit in a single packet.
       */
      ConnectionType ct = Connection.StringToMainType( con_type_string );
      AHAddress ah_addr = addr as AHAddress;
      if (ah_addr != null) {
        //we need to find the MAX_NEIGHBORS closest guys to addr
        foreach(Connection c in  _connection_table.GetNearestTo(ah_addr, MAX_NEIGHBORS)) {
          neighbors.Add(NodeInfo.CreateInstance(c.Address));
        }
      } else {
        //if address is null, we send the list of
        int count = 0;
        foreach(Connection c in _connection_table.GetConnections( ct ) ) {
          neighbors.Add(NodeInfo.CreateInstance(c.Address));
          count++;
          if (count >= MAX_NEIGHBORS) {
            break;
          }
        }
      }
      return new StatusMessage( con_type_string, neighbors );
    }
    /**