Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWIFtpPwdReply


RWIFtpPwdReplyRWIFtpReplyRWINumReplyRWIReply

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>
RWIFtpPwdReply reply;

Required Libraries

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

Description

RWIFtpPwdReply is a specialization class of RWIFtpReply. RWIFtpPwdReply attempts to parse the FTP protocol reply for the current directory information. For instance, the following is a common type of server reply from the PWD command:

257 "/pub" is the current directory

In this reply, 257 is a standardized reply, as defined by the FTP RFC 959. However, the RFC does not state a standard syntax for returning the directory information in the text part of the message. RWIFtpPwdReply examines RWINumReplyLine objects contained within self in a last-to-first order, searching for a quoted string. As soon as a match is found, a data member is set to the path. The path can be obtained with the directory member function.

Note that this technique is not guaranteed, because the directory information is returned in the reply text part of the protocol reply. In practice, all the FTP servers we have seen comply with this practice. For this reason, failure to parse the directory from the reply does not constitute an error. If the directory name cannot be parsed, the directory method simply returns an empty string.

Public Constructors

RWIFtpPwdReply();

Copy Constructors

RWIFtpPwdReply(const RWIFtpPwdReply& reply);

Assignment Operators

RWIFtpPwdReply&
operator=(const RWIFtpPwdReply& reply);

Public Member Functions

RWCString
directory();

Protected Member Functions

virtual void
parse();

Global Operators

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


Previous fileTop of DocumentContentsIndexNext file

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