public TcpClientManager(string ipAddress, int port, string key, int timeout)
        {
            mSocClient = new SyncSocClient(ipAddress, port, timeout);
            mSocClient.SocStatusChanged += TcpClientStatusChanged;
            mSocClient.MessageReceived  += ProcessOnMessageReceived;
            mSocClient.ConnectionError  += ProcessOnConnectionError;
            mSocClient.SetKey(key);
            stateObj     = new StateObject(mSocClient.getSocket());
            stateObj.Key = key;

            connCloseTimer          = new System.Timers.Timer(10000);
            connCloseTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnConnStopTimerElapsed);
        }
        public TcpClientManager(string ipAddress, int port, string key, int timeout)
        {
            mSocClient = new SyncSocClient(ipAddress, port, timeout);
            mSocClient.SocStatusChanged += TcpClientStatusChanged;
            mSocClient.MessageReceived += ProcessOnMessageReceived;
            mSocClient.ConnectionError += ProcessOnConnectionError;
            mSocClient.SetKey(key);
            stateObj = new StateObject(mSocClient.getSocket());
            stateObj.Key = key;

            connCloseTimer = new System.Timers.Timer(10000);
            connCloseTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnConnStopTimerElapsed);
        }