📄 class_nonblocking_sink.html
字号:
<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) > 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">IsolatedFlush()</a>, and <a class="el" href="network_8cpp-source.html#l00418">NetworkSink::Put2()</a>.</div></div><p><a class="anchor" name="25686ebe4c3ba26e7eeaae1dcd4d4215"></a><!-- doxytag: member="NonblockingSink::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>& BufferedTransformation::Ref </td> <td>(</td> <td class="paramname"> </td> <td> ) </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="interface for buffered transformations">BufferedTransformation</a> object to a function that takes a non-const reference. <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00735">735</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.</div></div><p><a class="anchor" name="f390325c959c3d6a2c03a447d6cd469d"></a><!-- doxytag: member="NonblockingSink::CreatePutSpace" ref="f390325c959c3d6a2c03a447d6cd469d" args="(size_t &size)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual byte* BufferedTransformation::CreatePutSpace </td> <td>(</td> <td class="paramtype">size_t & </td> <td class="paramname"> <em>size</em> </td> <td> ) </td> <td width="100%"><code> [inline, virtual, inherited]</code></td> </tr> </table></div><div class="memdoc"><p>request space which can be written into by the caller, and then used as input to <a class="el" href="class_buffered_transformation.html#e70658b0d271f8e114ac6c3cc9774ede" title="input a byte for processing">Put()</a> <p><dl class="note" compact><dt><b>Note:</b></dt><dd>The purpose of this method is to help avoid doing extra memory allocations. </dd></dl><p>Reimplemented in <a class="el" href="class_meter_filter.html#49d92192dcbd3366ff0576159ea62e9d">MeterFilter</a>, <a class="el" href="class_hash_filter.html#5c2f3a90ced66c835969ce1aa235b63e">HashFilter</a>, <a class="el" href="class_redirector.html#09afd32c22cc2d4ef9ddc8650b8657f5">Redirector</a>, <a class="el" href="class_output_proxy.html#e0400c5e91f8d8c50e2b4da7d15bf646">OutputProxy</a>, <a class="el" href="class_array_sink.html#535e57a894542c088131bc84955c475b">ArraySink</a>, <a class="el" href="class_array_xor_sink.html#39567ce27137cc06ed9a2b0a1c834f01">ArrayXorSink</a>, <a class="el" href="class_byte_queue.html#e6b49917c3217c5e3b8dd71d40498e5f">ByteQueue</a>, <a class="el" href="class_multichannel.html#f0b0eb15ec27d19c93a1455d948c578e">Multichannel< Filter ></a>, and <a class="el" href="class_multichannel.html#f0b0eb15ec27d19c93a1455d948c578e">Multichannel< Sink ></a>.<p>Definition at line <a class="el" href="cryptlib_8h-source.html#l00754">754</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>Referenced by <a class="el" href="cryptlib_8cpp-source.html#l00239">BufferedTransformation::ChannelCreatePutSpace()</a>, and <a class="el" href="filters_8h-source.html#l00613">ArrayXorSink::CreatePutSpace()</a>.</div></div><p><a class="anchor" name="d396dcb42260f23125a35ec0e5d17d55"></a><!-- doxytag: member="NonblockingSink::Put2" ref="d396dcb42260f23125a35ec0e5d17d55" args="(const byte *inString, size_t length, int messageEnd, bool blocking)=0" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual size_t BufferedTransformation::Put2 </td> <td>(</td> <td class="paramtype">const byte * </td> <td class="paramname"> <em>inString</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>length</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>messageEnd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>blocking</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual, inherited]</
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -