示例#1
0
    public static void StartFallbackSendAckThread()
    {
            #if !UNITY_WEBGL
        if (sendThreadShouldRun)
        {
            return;
        }

        sendThreadShouldRun = true;
        SupportClassPun.CallInBackground(FallbackSendAckThread);   // thread will call this every 100ms until method returns false
            #endif
    }
示例#2
0
    public static void StartFallbackSendAckThread()
    {
        if (Application.platform == RuntimePlatform.WebGLPlayer)
        {
            if (sendThreadShouldRun)
            {
                return;
            }

            sendThreadShouldRun = true;
            SupportClassPun.CallInBackground(FallbackSendAckThread);               // thread will call this every 100ms until method returns false
        }
    }
示例#3
0
        public bool EstablishEncryption()
        {
            bool asyncKeyExchange = PhotonPeer.AsyncKeyExchange;
            bool result;

            if (asyncKeyExchange)
            {
                SupportClass.CallInBackground(delegate
                {
                    this.peerBase.ExchangeKeysForEncryption(this.SendOutgoingLockObject);
                    return(false);
                });
                result = true;
            }
            else
            {
                result = this.peerBase.ExchangeKeysForEncryption(this.SendOutgoingLockObject);
            }
            return(result);
        }
示例#4
0
 public static void CallInBackground(Func <bool> myThread)
 {
     SupportClass.CallInBackground(myThread, 100);
 }