Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWStreamCoupler



Module

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

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

Data Types

Member Functions

Synopsis

#include <rw/toolpro/coupler.h>
RWStreamCoupler couple;

Required Libraries

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

Description

RWStreamCoupler provides an automated mechanism for connecting an input stream to an output stream. It can be used in conjunction with the network communication portal streams and the thread-hot internet class library to couple an FTP get to an FTP put, an FTP get to a file, an FTP put from a file, and a POP3 get to a file. Or it may simply be used to automate copying one file to another.

The coupling mechanism respects canonical line termination in ASCII mode, and always uses <cr><lf> pairs to terminate lines when streaming out to a portal.

An optional end-of-input filter may be provided to terminate the processing of the input stream prior to the end of the stream.

Example

Public Typedefs

typedef RWBoolean(*Filter)(const RWCString&);

Public Enums

enum TransferMode { mode_ascii, mode_binary }

Public Constructors

RWStreamCoupler(TransferMode mode=ASCII);

Public Member Functions

void
setMode(TransferMode mode); 

Public Member Operators

RWBoolean
operator()(istream& in, ostream& out); 
RWBoolean
operator()(istream& in, ostream& out, Filter filter); 
RWBoolean
operator()(istream& in, RWPortalOStream& out); 
RWBoolean
operator()(istream& in, RWPortalOStream& out,
           Filter filter);


Previous fileTop of DocumentContentsIndexNext file

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