示例#1
0
        /// <summary>
        /// Collects all local IPs of every NIC that is currently in operational status <c>Up</c> (active).
        /// Note: Only NICs of type <c>Wireless80211</c> and <c>Ethernet</c> are considered.
        /// </summary>
        /// <returns>An array of local IPs for every active NIC</returns>
        private static IPAddress[] GetLocalIPs()
        {
            var a = new NetworkInterfaceAccumulator();

            a.Accumulate(AddressFamily.InterNetwork);
            return(a.IPs.ToArray());
        }
示例#2
0
        /// <summary>
        /// Collects all local IPs of every NIC that is currently in operational status <c>Up</c> (active).
        /// Note: Only NICs of type <c>Wireless80211</c> and <c>Ethernet</c> are considered.
        /// </summary>
        /// <returns>An array of local IPs for every active NIC</returns>
        private static IPAddress[] GetLocalIPs()
        {
            BeardedManStudios.Forge.Logging.BMSLog.Log("### BEGIN GetLocalIPs()");
            var a = new NetworkInterfaceAccumulator();

            a.Accumulate(AddressFamily.InterNetwork);

            BeardedManStudios.Forge.Logging.BMSLog.Log("### END GetLocalIPs(): " + a.IPs.ToArray());
            return(a.IPs.ToArray());
        }