示例#1
0
 /// <summary>
 /// Flush any messages that are in the pipe downstream.
 /// </summary>
 public void Flush()
 {
     if (m_pipe != null)
     {
         m_pipe.Flush();
     }
 }
示例#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();
                }
            }
        }
示例#3
0
 /// <summary>
 /// Flush any messages that are in the pipe downstream.
 /// </summary>
 public void Flush()
 {
     m_pipe?.Flush();
 }