Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWINumReply


RWINumReplyRWIReply

Module

Networking Tools: Thread-hot Internet Classes (int library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Synopsis

#include <rw/toolpro/nreply.h>
RWINumReply reply;

Required Libraries

thr, net, int, tls (and possibly std)

Description

RWINumReply encapsulates a numerical protocol reply typical of many common Internet protocols. For instance, typical FTP replies in the forms shown in the following table are parsed first into RWINumReplyLine objects and then stored in an RWINumReply object. Individual RWINumReplyLine objects can be obtained using the operator[].

 
Single Line RepliesMultiple Line Replies
200 Command Ok
220-Text Message 1
Text Message 2
Text Message 3
220 Text Message 4

The numerical portion of a reply is a 3-digit number in ASCII. The number determines how the reply is processed and how the software proceeds after processing the reply. Since the first digit of the 3-digit reply number gives enough information on the general status of the result of a command, convenience methods are provided in RWINumReply to decide in which category a reply falls (within the 1XX, 2XX, 3XX, 4XX, or 5XX family) without going into too much detail for each individual reply code.

Public Constructors

RWINumReply();

Public Destructor

virtual
~RWINumReply();

Copy Constructor

RWINumReply(const RWINumReply& reply);

Assignment Operator

RWINumReply&
operator=(const RWINumReply& reply);

Public Member Functions

void
clearAndDestroy();
unsigned int
code() const;
RWCString
data() const;
int
entries() const; 
RWBoolean
is1XX() const; 
RWBoolean
is2XX() const;
RWBoolean
is3XX() const;
RWBoolean
is4XX() const;
RWBoolean
is5XX() const;

Indexing Operators

const RWINumReplyLine&
operator[](size_t i) const;

Protected Member Functions

void
append(RWINumReplyLine& r);
void
copy(const RWINumReply& r);
virtual void
parse();
void
readFromPortal(const RWSocketPortal& portal);

Global Operators

ostream&
operator<<(ostream& strm, const RWINumReply& r);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.