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

int PChannel::ReadChar (  )  [virtual, inherited]

Read a single 8 bit byte from the channel. If one was not available within the read timeout period, or an I/O error occurred, then the function gives with a -1 return value.

Returns:
byte read or -1 if no character could be read.

Definition at line 340 of file pchannel.cxx.

References PChannel::lastReadCount, and PChannel::Read().

Referenced by PInternetProtocol::ExecuteCommand(), PSMTPServer::OnMIMEData(), PChannel::ReadCharWithTimeout(), PTextFile::ReadLine(), PInternetProtocol::ReadLine(), PSocks4Socket::ReceiveSocksResponse(), and PChannel::SendCommandString().

{
  BYTE c;
  BOOL retVal = Read(&c, 1);
  return (retVal && lastReadCount == 1) ? c : -1;
}


Generated by  Doxygen 1.6.0   Back to index