Esempio n. 1
0
        private void btnWakeUp_Click(object sender, EventArgs e)
        {
            using (UdpClientConnection client = new UdpClientConnection()) {
                client.NetworkStream = new NetworkStream();

                client.Open(System.Net.IPAddress.Broadcast, 9);
                client.Broadcast();

                byte[] buf = GetWakeUpPacket(edtMAC.Text);
                client.WriteBytes(buf, 0, buf.Length);
            }

            MessageBox.Show("Done");
        }