/// <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); } }
public void Send(Command command) { bool ok; lock (m_sync) { m_commandPipe.Write(ref command, false); ok = m_commandPipe.Flush(); } if (!ok) { m_proactor.SignalMailbox(this); } }
/// <summary> /// Send the given Command out across the command-pipe. /// </summary> /// <param name="cmd">the Command to send</param> public void Send(Command cmd) { bool ok; lock (m_sync) { m_commandPipe.Write(ref cmd, false); ok = m_commandPipe.Flush(); } //if (LOG.isDebugEnabled()) // LOG.debug( "{} -> {} / {} {}", new Object[] { Thread.currentThread().getName(), cmd_, cmd_.arg , !ok}); if (!ok) { m_signaler.Send(); } }
public void Send(Command cmd) { lock (m_sync) { m_commandPipe.Write(ref cmd, false); bool ok = m_commandPipe.Flush(); if (!ok) { Monitor.PulseAll(m_sync); foreach (var signaler in m_signalers) { signaler.Send(); } } } }