コード例 #1
0
        /// <summary>Sends a Wake On LAN signal (magic packet) to a specific IP address with the physical address.</summary>
        /// <param name="address">The instance of the physical address that should be used in the magic packet.</param>
        /// <param name="target">Destination <see cref="IPAddress"/>.</param>
        /// <param name="password">The SecureOn password of the client.</param>
        /// <exception cref="ArgumentNullException"><paramref name="address"/> is null.</exception>
        public static void SendWol(this PhysicalAddress address, IPAddress target, SecureOnPassword password)
        {
            if (address == null)
                throw new ArgumentNullException(nameof(address));

            target.SendWol(address.GetAddressBytes(), password);
        }
コード例 #2
0
        /// <summary>Sends a Wake On LAN signal (magic packet) to a specific IP address with the physical address.</summary>
        /// <param name="address">The instance of the physical address that should be used in the magic packet.</param>
        /// <param name="target">Destination <see cref="IPAddress"/>.</param>
        /// <param name="password">The SecureOn password of the client.</param>
        /// <exception cref="ArgumentNullException"><paramref name="address"/> is null.</exception>
        public static void SendWol(this PhysicalAddress address, IPAddress target, SecureOnPassword password)
        {
            if (address == null)
            {
                throw new ArgumentNullException(nameof(address));
            }

            target.SendWol(address.GetAddressBytes(), password);
        }
コード例 #3
0
 /// <summary>
 /// Sendet ein Wake-On-LAN-Signal an die IP-Adresse der target-Instanz mit der MAC-Adresse der Instanz.
 /// </summary>
 /// <param name="address">Die Instanz der MacAddress, die im Wake-On-LAN-Signal angesprochen werden soll.</param>
 /// <param name="target">Der Ziel-IPEndPoint.</param>
 /// <param name="password">Das SecureOn-Passwort des Clients.</param>
 /// <exception cref="System.ArgumentNullException">password ist null.</exception>
 public static void SendWol(this MacAddress address, IPAddress target, SecureOnPassword password)
 {
     target.SendWol(address.Address, password);
 }
コード例 #4
0
 /// <summary>
 /// Sendet ein Wake-On-LAN-Signal an die IP-Adresse der target-Instanz mit der MAC-Adresse der Instanz.
 /// </summary>
 /// <param name="address">Die Instanz der MacAddress, die im Wake-On-LAN-Signal angesprochen werden soll.</param>
 /// <param name="target">Der Ziel-IPEndPoint.</param>
 public static void SendWol(this MacAddress address, IPAddress target)
 {
     target.SendWol(address.Address);
 }
コード例 #5
0
 /// <summary>Sends a Wake On LAN signal (magic packet) to a client.</summary>
 /// <param name="target">Destination <see cref="IPAddress"/>.</param>
 /// <param name="macAddress">The MAC address of the client.</param>
 /// <exception cref="ArgumentException">The length of the <see cref="PhysicalAddress" /> <paramref name="macAddress"/> is not 6.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="macAddress"/> is null.</exception>
 /// <exception cref="SocketException">An error occurred when accessing the socket. See Remarks section of <see cref="UdpClient.Send(byte[], int, IPEndPoint)"/> for more information.</exception>
 public static void SendWol(this IPAddress target, PhysicalAddress macAddress) => target.SendWol(macAddress, null);
コード例 #6
0
 /// <summary>Sends a Wake On LAN signal (magic packet) to a client.</summary>
 /// <param name="target">Destination <see cref="IPAddress"/>.</param>
 /// <param name="macAddress">The MAC address of the client.</param>
 /// <exception cref="ArgumentException">The length of the <see cref="T:System.Byte" /> array <paramref name="macAddress"/> is not 6.</exception>
 /// <exception cref="ArgumentNullException"><paramref name="macAddress"/> is null.</exception>
 /// <exception cref="SocketException">An error occurred when accessing the socket. See Remarks section of <see cref="UdpClient.Send(byte[], int, IPEndPoint)"/> for more information.</exception>
 public static void SendWol(this IPAddress target, byte[] macAddress) => target.SendWol(macAddress, null);
コード例 #7
0
 public static void SendWol(this IPAddress target, byte mac0, byte mac1, byte mac2, byte mac3, byte mac4, byte mac5) => target.SendWol(mac0, mac1, mac2, mac3, mac4, mac5, DefaultWolPort);
コード例 #8
0
        /// <summary>
        /// Sendet ein Wake-On-LAN-Signal an die IP-Adresse der target-Instanz mit der MAC-Adresse der Instanz.
        /// </summary>
        /// <param name="address">Die Instanz der MacAddress, die im Wake-On-LAN-Signal angesprochen werden soll.</param>
        /// <param name="target">Der Ziel-IPEndPoint.</param>
        public static void SendWol(this PhysicalAddress address, IPAddress target)
        {
            if (address == null)
                throw new ArgumentNullException("address");

            target.SendWol(address.GetAddressBytes());
        }