📄 classppipechannel.html
字号:
</tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The <a class="el" href="classPChannel.html#z49_3">GetLastReadCount()</a> function returns the actual number of bytes read.<p>If there are no more characters available as the sub-program has stopped then the number of characters available is returned. This is similar to end of file for the <a class="el" href="classPFile.html">PFile</a> channel.<p>The <a class="el" href="classPChannel.html#z55_2">GetErrorCode()</a> function should be consulted after <a class="el" href="classPPipeChannel.html#z217_1">Read()</a> returns FALSE to determine what caused the failure.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em> </td><td>Pointer to a block of memory to receive the read bytes. Maximum number of bytes to read into the buffer. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z49_2">PChannel</a>. </td> </tr></table><a name="z219_11" doxytag="PPipeChannel::ReadStandardError"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> BOOL PPipeChannel::ReadStandardError </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>errors</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>wait</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read all available data on the standard error stream of the sub-process. If the wait# parameter is FALSE then only the text currently available is returned. If TRUE then the function blocks as long as necessary to get some number of bytes.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE indicates that at least one character was read from stderr. FALSE means no bytes were read due to timeout or some other I/O error. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>wait</em> </td><td>String to receive standard error text. Flag to indicate if function should block </td></tr></table></dl> </td> </tr></table><a name="z219_9" doxytag="PPipeChannel::WaitForTermination"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::WaitForTermination </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPTimeInterval.html">PTimeInterval</a> & </td> <td class="mdname1" valign="top" nowrap> <em>timeout</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function will block and wait for the sub-program to terminate. It will wait only for the specified amount of time.<p><dl compact><dt><b>Returns: </b></dt><dd> Return code from the closing process, -1 if timed out. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>timeout</em> </td><td>Amount of time to wait for process. </td></tr></table></dl> </td> </tr></table><a name="z219_8" doxytag="PPipeChannel::WaitForTermination"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::WaitForTermination </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function will block and wait for the sub-program to terminate.<p><dl compact><dt><b>Returns: </b></dt><dd> Return code from the closing process </dl> </td> </tr></table><a name="z217_2" doxytag="PPipeChannel::Write"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PPipeChannel::Write </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const void * </td> <td class="mdname" nowrap> <em>buf</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX </td> <td class="mdname" nowrap> <em>len</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The <a class="el" href="classPChannel.html#z51_3">GetLastWriteCount()</a> function returns the actual number of bytes written.<p>If the sub-program has completed its run then this function will fail returning FALSE.<p>The <a class="el" href="classPChannel.html#z55_2">GetErrorCode()</a> function should be consulted after <a class="el" href="classPPipeChannel.html#z217_2">Write()</a> returns FALSE to determine what caused the failure.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if at least len bytes were written to the channel. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em> </td><td>Pointer to a block of memory to write. Number of bytes to write. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z51_2">PChannel</a>. </td> </tr></table><hr><h2>Member Data Documentation</h2><a name="n4" doxytag="PPipeChannel::childPid"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::childPid<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="n2" doxytag="PPipeChannel::fromChildPipe"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::fromChildPipe[2]<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="n5" doxytag="PPipeChannel::retVal"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::retVal<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="n3" doxytag="PPipeChannel::stderrChildPipe"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::stderrChildPipe[2]<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="n0" doxytag="PPipeChannel::subProgName"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPFilePath.html">PFilePath</a> PPipeChannel::subProgName<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>The fully qualified path name for the sub-program executable.<p> </td> </tr></table><a name="n1" doxytag="PPipeChannel::toChildPipe"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int PPipeChannel::toChildPipe[2]<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="pipechan_8h-source.html">pipechan.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:18 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -