예제 #1
0
        bool SendCommunicationActual(string json)
        {
            bool success = false;

                        #if !UNITY_WEBGL
            switch (TrilleonConnectionStrategy)
            {
            case ConnectionStrategyType.Pubnub:
                PubnubConnectionStrategy.SendCommunication(json);
                success = true;
                break;

                #if !UNITY_ANDROID
            case ConnectionStrategyType.Socket:
                if (SocketConnectionStrategy.SubscriptionsComplete)
                {
                    SocketConnectionStrategy.SendCommunication(json);
                    success = true;
                }
                break;
                #endif
            }
                        #endif
            return(success);
        }
예제 #2
0
        void SendCommunicationActual(string json)
        {
            switch (TrilleonConnectionStrategy)
            {
            case ConnectionStrategyType.Pubnub:
                PubnubConnectionStrategy.SendCommunication(json.ToString());
                break;

            case ConnectionStrategyType.Socket:
                SocketConnectionStrategy.SendCommunication(json.ToString());
                break;
            }
        }
예제 #3
0
        void Start()
        {
            SocketConnectionStrategy.Set();
            PubnubConnectionStrategy.Set();
            Strategy = string.Empty;

            //TODO: Revert when Android socket issue is fixed.
            if (Application.platform == RuntimePlatform.Android)
            {
                ChangeConnectionStrategy("pubnub");
            }
            else
            {
                ChangeConnectionStrategy(AutomationMaster.ConfigReader.GetString("CONNECTION_STRATEGY").ToLower());
            }
        }