Ejemplo n.º 1
0
 /// <summary>
 /// Flush any messages that are in the pipe downstream.
 /// </summary>
 public void Flush()
 {
     if (m_pipe != null)
     {
         m_pipe.Flush();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Remove any half processed messages. Flush unflushed messages.
        /// Call this function when engine disconnect to get rid of leftovers.
        /// </summary>
        private void CleanPipes()
        {
            if (m_pipe != null)
            {
                // Get rid of half-processed messages in the out pipe. Flush any
                // unflushed messages upstream.
                m_pipe.Rollback();
                m_pipe.Flush();

                // Remove any half-read message from the in pipe.
                while (m_incompleteIn)
                {
                    var msg = new Msg();
                    msg.InitEmpty();

                    if (PullMsg(ref msg) != PullMsgResult.Ok)
                    {
                        Debug.Assert(!m_incompleteIn);
                        break;
                    }
                    msg.Close();
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Flush any messages that are in the pipe downstream.
 /// </summary>
 public void Flush()
 {
     m_pipe?.Flush();
 }