Esempio n. 1
0
        internal bool checkForTimeout()
        {
            bool ret = false;

            if (isProcessingInteraction && (DateTime.Now.Ticks - m_currentInteraction.whenSentTicks) / 10000 > m_currentInteraction.timeoutMs)
            {
                Tracer.Error("timeout on " + m_currentInteraction.toSend);
                m_currentInteraction = null;
                ret = true;
            }

            return(ret);
        }
        internal bool checkForTimeout()
        {
            bool ret = false;

            if (isProcessingInteraction && (DateTime.Now.Ticks - m_currentInteraction.whenSentTicks) / 10000 > m_currentInteraction.timeoutMs)
            {
                Tracer.Error("timeout on " + m_currentInteraction.toSend);
                m_currentInteraction = null;
                ret = true;
            }

            return ret;
        }
Esempio n. 3
0
        internal bool onStringReceived(string str, long timestamp)              // may throw an exception
        {
            bool ret = false;

            lock (this.padlock)
            {
                if (m_currentInteraction != null)
                {
                    m_currentInteraction.received.Add(str);
                    if (m_currentInteraction.received.Count >= m_currentInteraction.linesToExpect)
                    {
                        // last line of the response
                        m_currentInteraction.interpretResponse(timestamp);
                        m_currentInteraction = null;
                        ret = true;
                    }
                }
            }
            return(ret);
        }
Esempio n. 4
0
 internal string dequeueForSend()
 {
     m_currentInteraction = (RQInteraction)m_queue.Dequeue();
     m_currentInteraction.whenSentTicks = DateTime.Now.Ticks;
     return(m_currentInteraction.toSend);
 }
        // may throw an exception
        internal bool onStringReceived(string str, long timestamp)
        {
            bool ret = false;

            lock (this.padlock)
            {
                if (m_currentInteraction != null)
                {
                    m_currentInteraction.received.Add(str);
                    if (m_currentInteraction.received.Count >= m_currentInteraction.linesToExpect)
                    {
                        // last line of the response
                        m_currentInteraction.interpretResponse(timestamp);
                        m_currentInteraction = null;
                        ret = true;
                    }
                }
            }
            return ret;
        }
 internal string dequeueForSend()
 {
     m_currentInteraction = (RQInteraction)m_queue.Dequeue();
     m_currentInteraction.whenSentTicks = DateTime.Now.Ticks;
     return m_currentInteraction.toSend;
 }