kioslave
FtpTextReader Class Reference
#include <ftp.h>

Public Types | |
| enum | { textReadBuffer = 2048, textReadLimit = 1024 } |
Public Member Functions | |
| FtpTextReader () | |
| void | textClear () |
| bool | textEOF () const |
| const char * | textLine () const |
| int | textRead (FtpSocket *pSock) |
| bool | textTooLong () const |
Detailed Description
Definition at line 59 of file ftp.h.
Member Enumeration Documentation
| anonymous enum |
- Enumerator:
textReadBuffer This is the physical size of m_szText.
Only up to textReadLimit characters are used to store a server reply. If the server reply is longer, the stored line gets truncated - see textTooLong()!
textReadLimit Max number of chars returned from textLine().
If the server sends more all chars until the next new-line are discarded.
Constructor & Destructor Documentation
Member Function Documentation
| void FtpTextReader::textClear | ( | ) |
| bool FtpTextReader::textEOF | ( | ) | const [inline] |
Returns true if the last textRead() got an EOF or an error.
| const char* FtpTextReader::textLine | ( | ) | const [inline] |
An accessor to the data read by textRead().
| int FtpTextReader::textRead | ( | FtpSocket * | pSock | ) |
Read a line from the socket into m_szText.
Only the first RESP_READ_LIMIT characters are copied. If the server response is longer all extra data up to the new-line gets discarded. An ending CR gets stripped. The number of chars in the buffer is returned. Use textToLong() to check for truncation!
| bool FtpTextReader::textTooLong | ( | ) | const [inline] |
Returns true if the last textRead() resulted in a truncated line.
The documentation for this class was generated from the following files:
KDE 3.5 API Reference