Пример #1
0
        public void initGimxRemote()
        {
            IPAddress serverAddr;

            gimxMap         = new GimxMaps();
            keepAlivePacket = new byte[4];

            // Setup Gimx Server Address
            _class.System.Debug("Gimx.log", "[3] Using GimxRemote server: " + _class.System.GimxAddress);
            _class.System.Debug("Gimx.log", "[3] GimxRemote KeepAlive: " + _class.System.GimxKeepAlive);
            gimxSocket         = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            serverAddr         = IPAddress.Parse(_class.System.GimxAddress);
            wakeEndPoint       = new IPEndPoint(serverAddr, 51913);
            controllerEndPoint = new IPEndPoint(serverAddr, 51914);

            // Setup the wakeup/keepalive packet & send it
            keepAlivePacket[0] = 0xDE;
            keepAlivePacket[1] = 0xAD;
            keepAlivePacket[2] = 0xBE;
            keepAlivePacket[3] = 0xEF;
            gimxSocket.SendTo(keepAlivePacket, wakeEndPoint);
        }
Пример #2
0
        public void initGimxRemote()
        {
            IPAddress serverAddr;

            gimxMap = new GimxMaps();
            keepAlivePacket = new byte[4];

            // Setup Gimx Server Address
            _class.System.Debug("Gimx.log", "[3] Using GimxRemote server: " + _class.System.GimxAddress);
            _class.System.Debug("Gimx.log", "[3] GimxRemote KeepAlive: " + _class.System.GimxKeepAlive);
            gimxSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            serverAddr = IPAddress.Parse(_class.System.GimxAddress);
            wakeEndPoint = new IPEndPoint(serverAddr, 51913);
            controllerEndPoint = new IPEndPoint(serverAddr, 51914);

            // Setup the wakeup/keepalive packet & send it
            keepAlivePacket[0] = 0xDE;
            keepAlivePacket[1] = 0xAD;
            keepAlivePacket[2] = 0xBE;
            keepAlivePacket[3] = 0xEF;
            gimxSocket.SendTo(keepAlivePacket, wakeEndPoint);
        }