SetClientToBrodcastMode() public method

public SetClientToBrodcastMode ( ) : void
return void
Beispiel #1
0
        public void WakeFunction(string MAC_ADDRESS)
        {
            WOLClass client = new WOLClass();

            client.Connect(new IPAddress(0xffffffff), 0x2fff);
            client.SetClientToBrodcastMode();

            int counter = 0;

            byte[] bytes = new byte[1024];   // more than enough :-)

            for (int y = 0; y < 6; y++)
            {
                bytes[counter++] = 0xFF;
            }

            for (int y = 0; y < 16; y++)
            {
                int i = 0;
                for (int z = 0; z < 6; z++)
                {
                    bytes[counter++] =
                        byte.Parse(MAC_ADDRESS.Substring(i, 2),
                                   NumberStyles.HexNumber);
                    i += 2;
                }
            }

            //now send wake up packet
            int reterned_value = client.Send(bytes, 1024);
        }
Beispiel #2
0
        public void WakeFunction(string MAC_ADDRESS)
        {
            WOLClass client = new WOLClass();
            client.Connect(new IPAddress(0xffffffff), 0x2fff);
            client.SetClientToBrodcastMode();

            int counter = 0;

            byte[] bytes = new byte[1024];   // more than enough :-)

            for (int y = 0; y < 6; y++)
                bytes[counter++] = 0xFF;

            for (int y = 0; y < 16; y++)
            {
                int i = 0;
                for (int z = 0; z < 6; z++)
                {
                    bytes[counter++] =
                        byte.Parse(MAC_ADDRESS.Substring(i, 2),
                        NumberStyles.HexNumber);
                    i += 2;
                }
            }

            //now send wake up packet
            int reterned_value = client.Send(bytes, 1024);
        }