Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 513 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 513 Bytes

WakeOnLanSharp

Simple WakeOnLan Utility for C#.

Installation

We recommend to insntall Stable WakeOnLanSharp using Nuget.

Install-Package WakeOnLanSharp

Sample Usage

using WakeOnLanSharp;
...
WakeOnLan wol = new WakeOnLan(9); //Port 9 is used here
...
string macAddress = "00-00-00-00-00-00";
//string macAddress = "00:00:00:00:00:00"; //Separator can be "-" or ":".

byte[] mac = WakeOnLan.ParseMacAddress(macAddress);
wol.SendMagicPacket(mac, IPAddress.Broadcast.ToString());