LLIOSocketReader Class Reference

An LLIOPipe implementation which reads from a socket. More...

#include <lliosocket.h>

Inheritance diagram for LLIOSocketReader:

Inheritance graph
Collaboration diagram for LLIOSocketReader:

Collaboration graph
List of all members.

Public Member Functions

 LLIOSocketReader (LLSocket::ptr_t socket)
 ~LLIOSocketReader ()

Protected Member Functions

virtual EStatus process_impl (const LLChannelDescriptors &channels, buffer_ptr_t &buffer, bool &eos, LLSD &context, LLPumpIO *pump)
 Process the data coming in the socket.

Protected Attributes

LLSocket::ptr_t mSource
std::vector< U8mBuffer
bool mInitialized

Detailed Description

An LLIOPipe implementation which reads from a socket.

See also:
An instance of a socket reader wraps around an LLSocket and performs non-blocking reads and passes it to the next pipe in the chain.

Definition at line 193 of file lliosocket.h.

Constructor & Destructor Documentation

LLIOSocketReader::LLIOSocketReader ( LLSocket::ptr_t  socket  ) 


Definition at line 244 of file lliosocket.cpp.

References LLMemType::MTYPE_IO_TCP.

LLIOSocketReader::~LLIOSocketReader (  ) 

Definition at line 251 of file lliosocket.cpp.

References LLMemType::MTYPE_IO_TCP.

Member Function Documentation

LLIOPipe::EStatus LLIOSocketReader::process_impl ( const LLChannelDescriptors channels,
buffer_ptr_t buffer,
bool &  eos,
LLSD context,
LLPumpIO pump 
) [protected, virtual]

Process the data coming in the socket.

Since the socket and next pipe must exist for process to make any sense, this method will return STATUS_PRECONDITION_NOT_MET unless if they are not known. If a STATUS_STOP returned by the next link in the chain, this reader will turn of the socket polling.

buffer Pointer to a buffer which needs processing. Probably NULL.
bytes Number of bytes to in buffer to process. Probably 0.
eos True if this function is the last. Almost always false.
read Number of bytes actually processed.
pump The pump which is calling process. May be NULL.
context A data structure to pass structured data
STATUS_OK unless the preconditions are not met.

Definition at line 258 of file lliosocket.cpp.

References ll_apr_warn_status(), lldebugs, llendl, mInitialized, mSource, LLMemType::MTYPE_IO_TCP, NULL, LLChannelDescriptors::out(), PUMP_DEBUG, LLPumpIO::setConditional(), LLIOPipe::STATUS_BREAK, LLIOPipe::STATUS_DONE, LLIOPipe::STATUS_ERROR, LLIOPipe::STATUS_OK, and LLIOPipe::STATUS_PRECONDITION_NOT_MET.

Member Data Documentation

std::vector<U8> LLIOSocketReader::mBuffer [protected]

Definition at line 229 of file lliosocket.h.

bool LLIOSocketReader::mInitialized [protected]

Definition at line 230 of file lliosocket.h.

Referenced by process_impl().

LLSocket::ptr_t LLIOSocketReader::mSource [protected]

Definition at line 228 of file lliosocket.h.

Referenced by process_impl().

The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:26 2010 for Second Life Viewer by  doxygen 1.4.7