LLIOSocketReader Class Reference

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

#include <lliosocket.h>

Inheritance diagram for LLIOSocketReader:

Inheritance graph
[legend]
Collaboration diagram for LLIOSocketReader:

Collaboration graph
[legend]

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:
LLIOPipe
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  ) 

LLIOSocketReader

Definition at line 280 of file lliosocket.cpp.

References LLMemType::MTYPE_IO_TCP.

LLIOSocketReader::~LLIOSocketReader (  ) 

Definition at line 287 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.

Parameters:
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
Returns:
STATUS_OK unless the preconditions are not met.

Definition at line 294 of file lliosocket.cpp.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 228 of file lliosocket.h.

Referenced by process_impl().

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

Definition at line 229 of file lliosocket.h.

Definition at line 230 of file lliosocket.h.

Referenced by process_impl().


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:50:42 2008 for SecondLife by  doxygen 1.5.5