rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWBufferedRecvPortal Class Reference
[Essential Networking Module]

Provides buffering of recv() calls only, possibly improving performance by limiting calls to the underlying RWPortal. More...

#include <rw/network/RWBufferedRecvPortal.h>

Inheritance diagram for RWBufferedRecvPortal:
RWPortal

List of all members.

Public Member Functions

 RWBufferedRecvPortal (void)
 RWBufferedRecvPortal (const RWPortal &portal, size_t bufferSize)

Detailed Description

RWBufferedRecvPortal inherits from RWPortal to provide buffering of recv() calls. When calling recv() on the underlying RWPortal is expensive, RWBufferedRecvPortal may substantially increase efficiency by limiting the number of calls to the underlying RWPortal.

Note:
When buffering receive data, all requests for data must be made through the RWBufferedRecvPortal object; do not make calls directly to the underlying RWPortal. Doing so may lose data that is currently buffered.

Examples

 RWPortal portal = RWSocketPortal();
 portal = RWBufferedRecvPortal(portal, 1024);

Constructor & Destructor Documentation

RWBufferedRecvPortal::RWBufferedRecvPortal ( void   ) 

Constructs an invalid RWBufferedRecvPortal. Attempts to send or receive on the portal throw an RWNetNoChannelError exception.

To use an instance created with this constructor, you must assign to it from a valid RWBufferedRecvPortal instance.

RWBufferedRecvPortal::RWBufferedRecvPortal ( const RWPortal portal,
size_t  bufferSize 
)

Constructs a buffered portal on an existing portal. bufferSize is the requested size for the underlying buffer.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.