Example #1
0
        public override void Start()
        {
            if (Log.IsVerbose)
            {
                Log.Verbose(ErrorCode.ProxyClient_GatewayConnStarted, "Starting gateway connection for gateway {0}", Address);
            }
            lock (Lockable)
            {
                if (State == ThreadState.Running)
                {
                    return;
                }

                Connect();
                initializationEvent.Set();
                if (!IsLive)
                {
                    // Only partially initialized, callers responsibility
                    // is not to use this object.
                    return;
                }

                // If the Connect succeeded
                receiver.Start();
                base.Start();
            }
        }
Example #2
0
        public override void Start()
        {
            if (Log.IsVerbose)
            {
                Log.Verbose(ErrorCode.ProxyClient_GatewayConnStarted, "Starting gateway connection for gateway {0}", Address);
            }
            lock (Lockable)
            {
                if (State == ThreadState.Running)
                {
                    return;
                }
                Connect();
                if (!IsLive)
                {
                    return;
                }

                // If the Connect succeeded
                receiver.Start();
                base.Start();
            }
        }