Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWPortal



Module

Networking Tools: Network Communication Classes (net library)

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

Member Functions

Synopsis

#include <rw/toolpro/portal.h>
RWPortal portal = RWSocketPortal(RWInetAddr(42,
                                 "tsunami.roguewave.com"));

Required Libraries

net, tls (and possibly std)

Description

An RWPortal is an access point of a reliable byte stream communication channel. It is possible for more than one RWPortal to access the same communications channel. This happens, for example, when using the copy constructor and assignment operator. Unless explicitly constructed otherwise, portal classes are designed so that when the last portal into a channel disappears, the communications channel is closed.

RWPortals are lightweight objects. Since copying and assignment copy only the RWPortal and not the underlying communications channel, these operations are inexpensive. As a result, RWPortals can be returned by value from functions and used as member data in objects.

RWPortals are implemented using the interface-implementation design pattern as described in the Tools.h++ Professional User's Guide. The RWPortal itself is really a handle to an implementation that represents the communication channel.

Public Constructors

RWPortal();
RWPortal(const RWPortal&);

Public Destructor

~RWPortal();

Copy Constructors

RWPortal(const RWPortal& x);

Assignment Operators

RWPortal& 
operator=(const RWPortal& x);

Public Member Functions

RWCString 
recv() const;
int 
recv(char* buf, int bufLen) const 
RWCString 
recvAtLeast(int n) const;
int 
recvAtLeast(char *buf, int bufLen, int n) const;
int 
send(const RWCString& s) const;
int 
send(const char* buf, int buflen) const;
int 
sendAtLeast(const char* buf, int bufLen, int n) const;
void 
sendAtLeast(const char* buf, int bufLen) const;
int 
sendAtLeast(const RWCString& s, int n) const;
void 
sendAtLeast(const RWCString& s) const;

Protected Constructors

RWPortal(RWPortalImp *impl);

Global Operators

RWBoolean
operator==(const RWPortal&p, const RWPortal& q)

Protected Member Functions

const RWPortalImp* 
implementation() const {return impl_;}


Previous fileTop of DocumentContentsIndexNext file

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