コード例 #1
0
        /// <summary>
        /// Inicializa las variables locales
        /// </summary>
        private void init()
        {
            try
            {
                netUserList = new NetUserList();
                router = new Router(routerMessageErrorHandler, configuration.NetData.WaitForAck, messageTypes);
                stopPoint = 0;

                timerPoint = 0;
                timerWaitPoint = 0;
                timer = new System.Timers.Timer(configuration.NetData.TimeIntervalTimer);
                timer.Elapsed += new ElapsedEventHandler(communicationTimer);

                bagPoint = 0;
                bagWaitPoint = 0;
                bag = new System.Timers.Timer(configuration.NetData.TimeIntervalTimer);
                bag.Elapsed += new ElapsedEventHandler(communicationBag);

                tcpThread = new Thread(new ThreadStart(processTCPMessages));
                udpThreads = new Thread(new ThreadStart(processUDPMessages));
                messageThreads = new Thread(new ThreadStart(processNotSentMessages));

                userListLock = new Object();
            }
            catch (ThreadAbortException e)
            {
                throw e;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #2
0
        /// <summary>
        /// Inicializa las variables locales
        /// </summary>
        private void init()
        {
            try
            {
                netUserList = new NetUserList();
                router = new Router(routerMessageErrorHandler, configuration.NetData.WaitForAck, messageTypes);
                stopPoint = 0;

                timerPoint = 0;
                timerWaitPoint = 0;

                tcpThread = new Thread(new ThreadStart(processTCPMessages));

                udpThread = new Thread(new ThreadStart(processUDPMessages));

                messageThreads = new Thread(new ThreadStart(processNotSentMessages));

                bagPoint = 0;
                bagWaitPoint = 0;

                userListLock = new Object();

            }
            catch (ThreadAbortException e)
            {
                throw e;
            }
            catch (Exception e)
            {
                throw e;
            }
        }