Example #1
0
 internal virtual void Process(HiccupCommand command)
 {
     throw new NotImplementedException();
 }
Example #2
0
 public static void SendHiccup(Pipe destination, YPipe<Frame> pipe)
 {
     var command = new HiccupCommand(destination, pipe);
     SendCommand(command);
 }
Example #3
0
        internal override void Process(HiccupCommand command)
        {
            //  Destroy old outpipe. Note that the read end of the pipe was already
            //  migrated to this thread.
            m_outpipe.Flush();

            Frame frame;

            // empty the outpipe
            while (m_outpipe.TryRead(out frame))
            {
                if (!frame.More)
                    m_messagesWritten--;

                frame.Close();
            }

            //  Plug in the new outpipe.
            m_outpipe = command.Pipe;
            m_outActive = true;

            //  If appropriate, notify the user about the hiccup.
            if (m_state == State.Active)
            {
                var temp = Hiccuped;
                if (temp != null)
                {
                    temp(this, new PipeEventArgs(this));
                }
            }
        }