Esempio n. 1
0
        private void Init(string certificateName, bool enableTlS, bool enablePolling, bool enableReconnect, int connTimeout)
        {
            _eventManager          = new EventManager();
            _typeRequestSubscriber = new TypeSubscriber <uint>();
            _typePushSubscriber    = new TypeSubscriber <string>();
            _client = PitayaBinding.CreateClient(enableTlS, enablePolling, enableReconnect, connTimeout, this);

            if (certificateName != null)
            {
                PitayaBinding.SetCertificateName(certificateName);
            }
        }
Esempio n. 2
0
        private void Init(string certificateName, bool enableTlS, bool enablePolling, bool enableReconnect, int connTimeout)
        {
            _eventManager          = new EventManager();
            _typeRequestSubscriber = new TypeSubscriber <uint>();
            _typePushSubscriber    = new TypeSubscriber <string>();
            _client = PitayaBinding.CreateClient(enableTlS, enablePolling, enableReconnect, connTimeout, this);

            if (certificateName != null)
            {
#if UNITY_EDITOR
                if (File.Exists(certificateName))
                {
                    PitayaBinding.SetCertificatePath(certificateName);
                }
                else
                {
                    PitayaBinding.SetCertificateName(certificateName);
                }
#else
                PitayaBinding.SetCertificateName(certificateName);
#endif
            }
        }