SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Provides timed send() and recv() calls. More...
#include <rw/network/RWTimedPortal.h>
Public Member Functions | |
RWTimedPortal () | |
RWTimedPortal (const RWPortal &portal, unsigned long timeout) | |
Public Member Functions inherited from RWPortal | |
RWPortal () | |
RWPortal (const RWPortal &x) | |
~RWPortal () | |
RWPortal & | operator= (const RWPortal &x) |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from RWPortal | |
RWPortal (RWPortalImp *impl) | |
const RWPortalImp * | implementation () const |
RWPortalImp * | implementation () |
RWTimedPortal inherits from RWPortal to provide timed send() and recv() calls. If send() and recv() calls on the underlying RWPortal might block for too long, RWTimedPortal provides a mechanism for breaking out of those calls after a predetermined amount of time.
If the underlying RWPortal does not support timed send() and recv() calls, an RWNetTimeoutNotImplementedError exception is thrown the first time either send() or recv() is invoked.
If the specified timeout is exceeded in a call to send() or recv(), an RWNetOperationTimeoutError exception is thrown.
RWTimedPortal::RWTimedPortal | ( | ) |
Constructs an invalid RWTimedPortal. Attempts to send or receive on the portal throw an RWNetNoChannelError exception.
RWTimedPortal::RWTimedPortal | ( | const RWPortal & | portal, |
unsigned long | timeout | ||
) |
Constructs an RWTimedPortal from a portal object and a timeout. The RWTimedPortal object uses the underlying implementation from portal as the data sink for calls to send() and as the data source for calls to recv(). Passes the timeout
parameter on every send
and recv
operation to that implementation.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |