System.Net.SendWol.Send C# (CSharp) Method

Send() public static method

Sends a Wake On LAN signal (magic packet) to a client.
is null. is null. The length of the array is not 6. An error occurred when accessing the socket. See Remarks section of for more information.
public static Send ( IPEndPoint target, byte macAddress, SecureOnPassword password ) : void
target IPEndPoint Destination .
macAddress byte The MAC address of the designated client.
password SecureOnPassword The SecureOn password of the client.
return void
        public static void Send(IPEndPoint target, byte[] macAddress, SecureOnPassword password)
        {
            if (macAddress == null)
                throw new ArgumentNullException(nameof(macAddress));

            byte[] passwordBuffer = password?.GetPasswordBytes();
            byte[] packet = GetWolPacket(macAddress, passwordBuffer);
            SendPacket(target, packet);
        }

Same methods

SendWol::Send ( IPEndPoint target, System.Net.NetworkInformation.PhysicalAddress macAddress ) : void
SendWol::Send ( IPEndPoint target, System.Net.NetworkInformation.PhysicalAddress macAddress, SecureOnPassword password ) : void
SendWol::Send ( IPEndPoint target, byte macAddress ) : void
SendWol::Send ( IPEndPoint target, byte mac0, byte mac1, byte mac2, byte mac3, byte mac4, byte mac5 ) : void