SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWNetBuf Class Reference

Network communication buffer class. More...

#include <rw/network/RWNetBuf.h>

Public Types

enum  State { normal , eof }
 

Public Member Functions

 RWNetBuf ()
 
 RWNetBuf (const RWCString &buf, State state=normal)
 
RWCString getData () const
 
State getState () const
 
 operator bool () const
 
 operator RWCString () const
 

Detailed Description

RWNetBuf is a network communication buffer class. A network communication buffer contains bytes of data and associated flags that indicate the state of the buffer. An RWNetBuf should not be confused with a TLI netbuf (TLI is the Unix System V network communication interface).

Member Enumeration Documentation

◆ State

The State enum indicates the state of the buffer.

Enumerator
normal 

Nothing special

eof 

End of file

Constructor & Destructor Documentation

◆ RWNetBuf() [1/2]

RWNetBuf::RWNetBuf ( )

Constructs an empty buffer.

◆ RWNetBuf() [2/2]

RWNetBuf::RWNetBuf ( const RWCString & buf,
State state = normal )

Constructs a buffer from an RWCString. The optional state parameter indicates the state of the buffer at the time of construction.

Member Function Documentation

◆ getData()

RWCString RWNetBuf::getData ( ) const
inline

Returns an RWCString containing the buffer's contents.

◆ getState()

RWNetBuf::State RWNetBuf::getState ( ) const
inline

Returns the state of the buffer.

◆ operator bool()

RWNetBuf::operator bool ( ) const

Returns true if the state of the buffer is normal.

◆ operator RWCString()

RWNetBuf::operator RWCString ( ) const

Returns an RWCString containing the buffer's contents.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.