Esempio n. 1
0
            static private bool OnExec_callback(IntPtr instance, IntPtr message)
            {
                DebugCommandStation client = ReferenceDictionary <DebugCommandStation> .GetObject(instance);

                if (client != null && client.OnExec != null)
                {
                    return(client.OnExec.Invoke(Marshal.PtrToStringUni(message)));
                }

                return(true);
            }
Esempio n. 2
0
        void EnableMulticastState()
        {
#if UNITY_ANDROID
            AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic <AndroidJavaObject>("currentActivity");

            var wifiManager = activity.Call <AndroidJavaObject>("getSystemService", "wifi");

            multicastLock = wifiManager.Call <AndroidJavaObject>("createMulticastLock", "lock");

            multicastLock.Call("setReferenceCounted", true);

            multicastLock.Call("acquire");

            Message.Send(Message.GIZMOSDK, MessageLevel.DEBUG, "MultiCast Lock acquired");

            station = new DebugCommandStation("udp::45456?nic=${wlan0}&blocking=no");

            Thread thread = new Thread(new ThreadStart(WorkThreadFunction));
            thread.Start();
#endif
        }