public Hash[] GetConnectedNodes(ConnectionListType type) { return network.GetConnectedNodes(type); }
public Hash[] GetConnectedNodes(ConnectionListType type) { List<Hash> Conns = new List<Hash>(); if (type == ConnectionListType.Incoming || type == ConnectionListType.All) { foreach (KeyValuePair<Hash, IncomingClient> kvp in incomingConnectionHander.IncomingConnections) { if (kvp.Value.KeyExchanged) { Conns.Add(kvp.Key); } } } if (type == ConnectionListType.Outgoing || type == ConnectionListType.All) { foreach (KeyValuePair<Hash, OutgoingConnection> kvp in outgoingConnections) { if (kvp.Value.KeyExchanged) { Conns.Add(kvp.Key); } } } return Conns.ToArray(); }