📄 classpchannel.html
字号:
<td class="md" valign="top">( </td> <td class="md" nowrap valign="top">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>User callback function for when a <a class="el" href="classPChannel.html#z49_7">ReadAsync()</a># call has completed or timed out. The original pointer to the buffer passed in <a class="el" href="classPChannel.html#z49_7">ReadAsync()</a> is passed to the function. <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 that received the read bytes. Actual number of bytes to read into the buffer. </td></tr></table></dl> </td> </tr></table><a name="z51_7" doxytag="PChannel::OnWriteComplete"></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 void PChannel::OnWriteComplete </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>User callback function for when a <a class="el" href="classPChannel.html#z51_6">WriteAsync()</a> call has completed or timed out. The original pointer to the buffer passed in <a class="el" href="classPChannel.html#z51_6">WriteAsync()</a> is passed in here and the len parameter is the actual number of characters written. <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> </td> </tr></table><a name="b1" doxytag="PChannel::operator="></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"> PINLINE PChannel & PChannel::operator= </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PChannel & </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="b7" doxytag="PChannel::PXClose"></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 PChannel::PXClose </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="b6" doxytag="PChannel::PXSetIOBlock"></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 PChannel::PXSetIOBlock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPChannel.html#s26">PXBlockType</a> </td> <td class="mdname" nowrap> <em>type</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPTimeInterval.html">PTimeInterval</a> & </td> <td class="mdname" nowrap> <em>timeout</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="z49_2" doxytag="PChannel::Read"></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 PChannel::Read </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">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 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>The <a class="el" href="classPChannel.html#z55_2">GetErrorCode()</a> function should be consulted after <a class="el" href="classPChannel.html#z49_2">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 in <a class="el" href="classPEthSocket.html#z115_1">PEthSocket</a>, <a class="el" href="classPFile.html#z129_1">PFile</a>, <a class="el" href="classPIndirectChannel.html#z157_3">PIndirectChannel</a>, <a class="el" href="classPPipeChannel.html#z217_1">PPipeChannel</a>, <a class="el" href="classPSocket.html#a0">PSocket</a>, <a class="el" href="classPSoundChannel.html#z395_0">PSoundChannel</a>, <a class="el" href="classPTCPSocket.html#a0">PTCPSocket</a>, <a class="el" href="classPUDPSocket.html#z467_0">PUDPSocket</a>, <a class="el" href="classPVideoChannel.html#a2">PVideoChannel</a>, <a class="el" href="classPDelayChannel.html#z477_0">PDelayChannel</a>, <a class="el" href="classPInternetProtocol.html#a0">PInternetProtocol</a>, <a class="el" href="classPMemoryFile.html#z487_0">PMemoryFile</a>, <a class="el" href="classPSSLChannel.html#a3">PSSLChannel</a>, <a class="el" href="classPWAVFile.html#z495_0">PWAVFile</a>, <a class="el" href="classPQueueChannel.html#z501_0">PQueueChannel</a>, <a class="el" href="classPTelnetSocket.html#a2">PTelnetSocket</a>, and <a class="el" href="classPVXMLChannel.html#a5">PVXMLChannel</a>. </td> </tr></table><a name="z49_7" doxytag="PChannel::ReadAsync"></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 PChannel::ReadAsync </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">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>Begin an asynchronous read from channel. The read timeout is used as in other read operations, in this case calling the <a class="el" href="classPChannel.html#z49_8">OnReadComplete()</a> function.<p>Note that if the channel is not capable of asynchronous read then this will do a sychronous read is in the <a class="el" href="classPChannel.html#z49_2">Read()</a> function with the addition of calling the <a class="el" href="classPChannel.html#z49_8">OnReadComplete()</a> before returning.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the read was sucessfully queued. </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> </td> </tr></table><a name="z49_5" doxytag="PChannel::ReadBlock"></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -