本文整理汇总了C#中NetMQ.zmq.Pipe.Flush方法的典型用法代码示例。如果您正苦于以下问题:C# Pipe.Flush方法的具体用法?C# Pipe.Flush怎么用?C# Pipe.Flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetMQ.zmq.Pipe
的用法示例。
在下文中一共展示了Pipe.Flush方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: XAttachPipe
protected override void XAttachPipe(Pipe pipe, bool icanhasall)
{
Debug.Assert(pipe != null);
m_fq.Attach (pipe);
m_dist.Attach (pipe);
// Send all the cached subscriptions to the new upstream peer.
m_subscriptions.Apply (s_sendSubscription, pipe);
pipe.Flush ();
}
示例2: Write
// Write the message to the pipe. Make the pipe inactive if writing
// fails. In such a case false is returned.
private bool Write(Pipe pipe, Msg msg)
{
if (!pipe.Write (msg)) {
Utils.Swap(m_pipes, m_pipes.IndexOf (pipe), m_matching - 1);
m_matching--;
Utils.Swap(m_pipes, m_pipes.IndexOf (pipe), m_active - 1);
m_active--;
Utils.Swap(m_pipes, m_active, m_eligible - 1);
m_eligible--;
return false;
}
if (!msg.HasMore)
pipe.Flush ();
return true;
}
示例3: XHiccuped
protected override void XHiccuped(Pipe pipe)
{
// Send all the cached subscriptions to the hiccuped pipe.
m_subscriptions.Apply (s_sendSubscription, pipe);
pipe.Flush ();
}