Beispiel #1
0
        /// <summary>
        /// Flush the messages downstream.
        /// </summary>
        public void Flush()
        {
            //  The peer does not exist anymore at this point.
            if (m_state == State.Terminating)
            {
                return;
            }

            if (m_outboundPipe != null && !m_outboundPipe.Flush())
            {
                SendActivateRead(m_peer);
            }
        }
Beispiel #2
0
        public void Send(Command command)
        {
            bool ok;

            lock (m_sync)
            {
                m_cpipe.Write(ref command, false);
                ok = m_cpipe.Flush();
            }

            if (!ok)
            {
                m_proactor.SignalMailbox(this);
            }
        }
Beispiel #3
0
        public void Send(Command cmd)
        {
            bool ok = false;

            lock (m_sync){
                m_cpipe.Write(cmd, false);
                ok = m_cpipe.Flush();
            }

            //if (LOG.isDebugEnabled())
            //    LOG.debug( "{} -> {} / {} {}", new Object[] { Thread.currentThread().getName(), cmd_, cmd_.arg , !ok});

            if (!ok)
            {
                m_signaler.Send();
            }
        }