📄 classpchannel.html
字号:
<tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE int PChannel::GetHandle </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>Get the integer operating system handle for the channel.<p><dl compact><dt><b>Returns: </b></dt><dd> standard OS descriptor integer. </dl><p>Reimplemented in <a class="el" href="classPSoundChannel.html#z389_2">PSoundChannel</a>. </td> </tr></table><a name="z49_3" doxytag="PChannel::GetLastReadCount"></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 PINDEX PChannel::GetLastReadCount </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the number of bytes read by the last <a class="el" href="classPChannel.html#z49_2">Read()</a> call. This will be from 0 to the maximum number of bytes as passed to the <a class="el" href="classPChannel.html#z49_2">Read()</a> call.<p>Note that the number of bytes read may often be less than that asked for. Aside from the most common case of being at end of file, which the applications semantics may regard as an exception, there are some cases where this is normal. For example, if a <a class="el" href="classPTextFile.html">PTextFile</a> channel on the MSDOS platform is read from, then the translation of CR/LF pairs to <br> characters will result in the number of bytes returned being less than the size of the buffer supplied.<p><dl compact><dt><b>Returns: </b></dt><dd> the number of bytes read. </dl><p>Reimplemented in <a class="el" href="classPSoundChannel.html#z395_1">PSoundChannel</a>. </td> </tr></table><a name="z51_3" doxytag="PChannel::GetLastWriteCount"></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 PINDEX PChannel::GetLastWriteCount </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the number of bytes written by the last <a class="el" href="classPChannel.html#z51_2">Write()</a> call.<p>Note that the number of bytes written may often be less, or even more, than that asked for. A common case of it being less is where the disk is full. An example of where the bytes written is more is as follows. On a PTextFile# channel on the MSDOS platform, there is translation of <br> to CR/LF pairs. This will result in the number of bytes returned being more than that requested.<p><dl compact><dt><b>Returns: </b></dt><dd> the number of bytes written. </dl><p>Reimplemented in <a class="el" href="classPSoundChannel.html#z393_1">PSoundChannel</a>. </td> </tr></table><a name="z47_1" doxytag="PChannel::GetName"></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 <a class="el" href="classPString.html">PString</a> PChannel::GetName </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the platform and I/O channel type name of the channel. For example, it would return the filename in PFile# type channels.<p><dl compact><dt><b>Returns: </b></dt><dd>the name of the channel. </dl><p>Reimplemented in <a class="el" href="classPConsoleChannel.html#a0">PConsoleChannel</a>, <a class="el" href="classPFile.html#z129_0">PFile</a>, <a class="el" href="classPIndirectChannel.html#z157_0">PIndirectChannel</a>, <a class="el" href="classPIPSocket.html#a0">PIPSocket</a>, <a class="el" href="classPIPXSocket.html#z163_0">PIPXSocket</a>, <a class="el" href="classPPipeChannel.html#z217_0">PPipeChannel</a>, and <a class="el" href="classPVideoChannel.html#a22">PVideoChannel</a>. </td> </tr></table><a name="z49_1" doxytag="PChannel::GetReadTimeout"></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 <a class="el" href="classPTimeInterval.html">PTimeInterval</a> PChannel::GetReadTimeout </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>Get the timeout for read operations. Note that this function may not be available, or meaningfull, for all channels. In that case it returns the previously set value.<p><dl compact><dt><b>Returns: </b></dt><dd>time interval for read operations. </dl> </td> </tr></table><a name="z51_1" doxytag="PChannel::GetWriteTimeout"></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 <a class="el" href="classPTimeInterval.html">PTimeInterval</a> PChannel::GetWriteTimeout </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>Get the timeout for write operations to complete. Note that this function may not be available, or meaningfull, for all channels. In that case it returns the previously set value.<p><dl compact><dt><b>Returns: </b></dt><dd> time interval for writing. </dl> </td> </tr></table><a name="z45_1" doxytag="PChannel::HashFunction"></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 PINDEX PChannel::HashFunction </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Calculate a hash value for use in sets and dictionaries.<p>The hash function for strings will produce a value based on the sum of the first three characters of the string. This is a fairly basic function and make no assumptions about the string contents. A user may descend from <a class="el" href="classPString.html">PString</a> and override the hash function if they can take advantage of the types of strings being used, eg if all strings start with the letter 'A' followed by 'B or 'C' then the current hash function will not perform very well.<p><dl compact><dt><b>Returns: </b></dt><dd> hash value for string. </dl><p>Reimplemented from <a class="el" href="classPObject.html#z203_1">PObject</a>. </td> </tr></table><a name="z47_0" doxytag="PChannel::IsOpen"></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::IsOpen </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Determine if the channel is currently open. This indicates that read and write operations can be executed on the channel. For example, in the PFile# class it returns if the file is currently open.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if the channel is open. </dl><p>Reimplemented in <a class="el" href="classPIndirectChannel.html#z157_2">PIndirectChannel</a>, <a class="el" href="classPSoundChannel.html#z389_1">PSoundChannel</a>, <a class="el" href="classPVideoChannel.html#z473_1">PVideoChannel</a>, and <a class="el" href="classPVXMLChannel.html#a3">PVXMLChannel</a>. </td> </tr></table><a name="z49_8" doxytag="PChannel::OnReadComplete"></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::OnReadComplete </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -