Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Networking Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWPortal

Module:  Essential Networking Module   Package:  Networking


Does not inherit

Local Index

Members

Non-Members

Header File

#include <rw/network/RWPortal.h>

Description

RWPortal is an access point to 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. In addition, the copy constructor and the assignment operator copy only the RWPortal and not the underlying communications channel, which means that those 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 Essential Networking Module User's Guide. The RWPortal itself is really a handle to an implementation that represents the communication channel.

Public Constructors

RWPortal();
RWPortal(const RWPortal& x);

Public Destructor

~RWPortal();

Public Member Operator

RWPortal& 
operator=(const RWPortal& x);

Public Member Functions

RWNetBuf 
recv() const;
int 
recv(char* buf, int bufLen, RWNetBuf::State* state = 0) const; 
RWNetBuf 
recvAtLeast(int n) const;
int 
recvAtLeast(char *buf, int bufLen, int n, 
RWNetBuf::State *state = 0) 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 Constructor

RWPortal(RWPortalImp *impl);

Global Operator

bool
operator==(const RWPortal& p, const RWPortal& q);

Protected Member Function

const RWPortalImp* 
implementation() const;
RWPortalImp* 
implementation();


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.