Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PINDEX PChannel::GetLastReadCount (  )  const [virtual, inherited]

Get the number of bytes read by the last Read() call. This will be from 0 to the maximum number of bytes as passed to the Read() call.

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 PTextFile channel on the MSDOS platform is read from, then the translation of CR/LF pairs to
characters will result in the number of bytes returned being less than the size of the buffer supplied.

Returns:
the number of bytes read.

Reimplemented in PSoundChannel.

Definition at line 330 of file pchannel.cxx.

References PChannel::lastReadCount.

Referenced by PFTPClient::GetDirectoryNames(), PFTPClient::GetFileStatus(), PStructuredFile::Read(), PWAVFileFormat::Read(), PInternetProtocol::ReadLine(), and PFTPServer::SendToClient().

{ 
  return lastReadCount; 
}


Generated by  Doxygen 1.6.0   Back to index