using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace WOLAwaken.Helper
|
{
|
public class SendWOLPack
|
{
|
public byte[] SendData = new byte[102];
|
public int[] macAddress = new int[] { 0x04, 0x92, 0x26, 0xBE, 0x92, 0x98 };
|
|
public SendWOLPack()
|
{
|
int index = 0;
|
for (int i = 0; i < 6; i++)
|
{
|
SendData[index++] = Convert.ToByte(0xFF);
|
}
|
|
for (int i = 0; i < 16; i++)
|
{
|
foreach (var a in macAddress)
|
{
|
SendData[index++] = Convert.ToByte(a);
|
}
|
}
|
|
new SendUdpPack().SendMessage(SendData);
|
}
|
}
|
}
|