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

BOOL PChannel::WriteString ( const PString str  )  [inherited]

Write a string to the channel. This function simply uses the Write() function so all comments on that function also apply.

Returns:
TRUE if the character written.

Definition at line 403 of file pchannel.cxx.

References PString::GetLength(), PChannel::lastWriteCount, and PChannel::Write().

Referenced by PSMTPClient::EndMessage(), PPOP3Server::OnRETR(), PPOP3Server::OnTOP(), PTextFile::WriteLine(), PInternetProtocol::WriteLine(), and PInternetProtocol::WriteResponse().

{
  PINDEX len = str.GetLength();
  PINDEX written = 0;
  while (written < len) {
    if (!Write((const char *)str + written, len - written)) {
      lastWriteCount += written;
      return FALSE;
    }
    written += lastWriteCount;
  }
  lastWriteCount = written;
  return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index