Networking Tools: Thread-hot Internet Classes (int library)
code() codeAsString() data() is1XX() |
is2XX() is3XX() is4XX() is5XX() |
isContinued() isValid() operator<<() operator==() |
reset() set() text() |
#include <rw/toolpro/nreplyln.h> RWINumReplyLine reply; RWINumReplyLine reply("200 Command Ok");
thr, net, int, tls (and possibly std)
RWINumReplyLine encapsulates a single numerical protocol reply as defined by the FTP and SMTP protocols. An example reply line is 200 Command Ok. If the 4th character of a reply line is the symbol "-" instead of <space>, it means that the reply consists of multiple lines, with the symbol "-" as the continuation marker. The continuation attribute is therefore used by RWINumReply to build a complete reply that encapsulates an entire server response.
enum Family { INVALID, VALID_1XX, VALID_2XX, VALID_3XX, VALID_4XX, VALID_5XX };
Enumerates all possible reply categories.
RWINumReplyLine();
Constructs a default RWINumReplyLine object. You need to use the set method to initialize.
RWINumReplyLine(const RWCString& s);
Constructs an RWINumReplyLine object using the input s.
RWBoolean operator==(const RWINumReplyLine& other) const;
Returns TRUE if self is equal to other.
unsigned int code() const;
Returns the 3-digit reply code.
RWCString codeAsString() const;
Returns the reply code as an RWCString.
RWCString data() const;
Returns the raw text line that was parsed.
RWBoolean isContinued() const;
Returns TRUE if additional reply lines follow self in a whole reply.
RWBoolean isValid() const;
Returns TRUE if the reply line is valid.
RWBoolean is1XX() const; RWBoolean is2XX() const; RWBoolean is3XX() const; RWBoolean is4XX() const; RWBoolean is5XX() const;
Returns TRUE if self is in the reply family. Note that only one of the five methods may return TRUE for a valid reply line.
void reset();
Resets internal data.
void set(const RWCString& data);
Parses and sets internal data using the input data.
RWCString text() const;
Returns the text portion of the reply line.
ostream& operator<<(ostream& strm, const RWINumReplyLine& r);
Outputs an RWINumReplyLine object to an ostream.
Note: This class does not have an extraction (>>) operator.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.