⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_network_sink.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">size_t&nbsp;</td>          <td class="paramname"> <em>length</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>messageEnd</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">bool&nbsp;</td>          <td class="paramname"> <em>blocking</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>input multiple bytes for blocking or non-blocking processing <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>messageEnd</em>&nbsp;</td><td>means how many filters to signal MessageEnd to, including this one </td></tr>  </table></dl><p>Implements <a class="el" href="class_buffered_transformation.html#d396dcb42260f23125a35ec0e5d17d55">BufferedTransformation</a>.<p>Definition at line <a class="el" href="network_8cpp-source.html#l00418">418</a> of file <a class="el" href="network_8cpp-source.html">network.cpp</a>.<p>References <a class="el" href="queue_8cpp-source.html#l00187">ByteQueue::CurrentSize()</a>, <a class="el" href="cryptlib_8h-source.html#l00094">INFINITE_TIME</a>, <a class="el" href="cryptlib_8h-source.html#l00126">Exception::OTHER_ERROR</a>, <a class="el" href="cryptlib_8h-source.html#l00740">BufferedTransformation::Put()</a>, and <a class="el" href="network_8cpp-source.html#l00162">NonblockingSink::TimedFlush()</a>.</div></div><p><a class="anchor" name="f5da8dc12d42cf6152588ab02de4d336"></a><!-- doxytag: member="NetworkSink::TimedFlush" ref="f5da8dc12d42cf6152588ab02de4d336" args="(unsigned long maxTime, size_t targetSize=0)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">lword NonblockingSink::TimedFlush           </td>          <td>(</td>          <td class="paramtype">unsigned long&nbsp;</td>          <td class="paramname"> <em>maxTime</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">size_t&nbsp;</td>          <td class="paramname"> <em>targetSize</em> = <code>0</code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inherited]</code></td>        </tr>      </table></div><div class="memdoc"><p>flush to device for no more than maxTime milliseconds <p>This function will repeatedly attempt to flush data to some device, until the queue is empty, or a total of maxTime milliseconds have elapsed. If maxTime == 0, at least one attempt will be made to flush some data, but it is likely that not all queued data will be flushed, even if the device is ready to receive more data without waiting. If you want to flush as much data as possible without waiting for the device, call this function in a loop. For example: while (sink.TimedFlush(0) &gt; 0) {} <dl class="return" compact><dt><b>Returns:</b></dt><dd>number of bytes flushed </dd></dl><p>Definition at line <a class="el" href="network_8cpp-source.html#l00162">162</a> of file <a class="el" href="network_8cpp-source.html">network.cpp</a>.<p>References <a class="el" href="network_8cpp-source.html#l00013">LimitedBandwidth::ComputeCurrentTransceiveLimit()</a>, <a class="el" href="hrtimer_8cpp-source.html#l00054">TimerBase::ElapsedTime()</a>, <a class="el" href="network_8h-source.html#l00023">LimitedBandwidth::GetMaxBytesPerSecond()</a>, <a class="el" href="network_8cpp-source.html#l00067">LimitedBandwidth::GetWaitObjects()</a>, <a class="el" href="cryptlib_8h-source.html#l00094">INFINITE_TIME</a>, <a class="el" href="hrtimer_8h-source.html#l00025">TimerBase::MILLISECONDS</a>, <a class="el" href="network_8cpp-source.html#l00036">LimitedBandwidth::NoteTransceive()</a>, <a class="el" href="hrtimer_8cpp-source.html#l00031">TimerBase::StartTimer()</a>, <a class="el" href="network_8cpp-source.html#l00025">LimitedBandwidth::TimeToNextTransceive()</a>, and <a class="el" href="wait_8cpp-source.html#l00206">WaitObjectContainer::Wait()</a>.<p>Referenced by <a class="el" href="network_8cpp-source.html#l00220">NonblockingSink::IsolatedFlush()</a>, and <a class="el" href="network_8cpp-source.html#l00418">Put2()</a>.</div></div><p><a class="anchor" name="25686ebe4c3ba26e7eeaae1dcd4d4215"></a><!-- doxytag: member="NetworkSink::Ref" ref="25686ebe4c3ba26e7eeaae1dcd4d4215" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a>&amp; BufferedTransformation::Ref           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline, inherited]</code></td>        </tr>      </table></div><div class="memdoc"><p>return a reference to this object <p>This function is useful for passing a temporary <a class="el" href="class_buffered_transformation.html" title="

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -